Commit 3afaf3c
authored
test(jest): recycle workers above 512MB to bound vm-context module registry growth (#3550)
Adds `workerIdleMemoryLimit: '512MB'` to jest.config.js. Jest forks worker
child processes that accumulate per-suite vm-context module registry under
`--experimental-vm-modules` (~14 MB retained per loaded suite). On large
downstream test suites this leaks until the worker OOMs.
The flag tells jest to inspect each worker's RSS between suites and respawn
when it exceeds the threshold. Respawn cost (~150-300 ms) is negligible vs.
the OOM crash it avoids on long-running coverage runs.
This complements PR #3549 (migration pre-warm) which addressed migration
overhead but not the vm-context module registry growth.1 parent eae9410 commit 3afaf3c
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
224 | 231 | | |
0 commit comments