Repository navigation
Commit d4492d9
committed
test: harden test-process-exit-background-gc
The test only hung on an unfixed build about a third of the time,
because the window in which the main thread is out of JS depended on
how fast the machine runs pbkdf2, and the stress allocation task had
to run into the heap limit inside that window.
Calibrate the iteration count from a short probe so that the window
is about a second everywhere, and use up the old generation budget
just before exiting so that the next background allocation fails and
parks the task. Run in the test process instead of spawning a child,
which also drops the child process overhead.
On an unfixed build the test now hangs in 20 of 20 runs, and it
passes 30 of 30 with the fix.
Signed-off-by: Manzoor Wani <manzoorwani.jk@gmail.com>1 parent 4adeaab commit d4492d9
1 file changed
Lines changed: 24 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
10 | 11 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
22 | 15 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments