Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
Commit0b156c6
test: use checkIfCollectable in vm leak tests
Previously we simply create a lot of the target objects and checkif the process crash due to OOM. Due to how we use emphemeron GCto handle memory management, which is inefficient but necessaryfor correctness, the tests can produce false positives asthe GC isn't efficient enough to catch up with a very fastheap growth.This patch uses a new checkIfCollectable() utility to terminate thetest early once we detect that any of the target object can actuallybe garbage collected. This should lower the chance of false positives.As a drive-by this also allows us to use setImmediate() to grow theheap even faster to make the tests run faster.PR-URL:#49671Backport-PR-URL:#51004Reviewed-By: James M Snell <jasnell@gmail.com>Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>1 parent1586c11 commit0b156c6
File tree
4 files changed
+20
-33
lines changed- test/es-module
4 files changed
+20
-33
lines changedLines changed: 5 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| 7 | + | |
7 | 8 |
| |
8 |
| - | |
9 | 9 |
| |
10 |
| - | |
11 |
| - | |
12 |
| - | |
| 10 | + | |
| 11 | + | |
13 | 12 |
| |
14 | 13 |
| |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 | 14 |
| |
19 |
| - | |
| 15 | + | |
| 16 | + |
Lines changed: 4 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| 7 | + | |
7 | 8 |
| |
8 |
| - | |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 | 15 |
| |
19 |
| - | |
| 16 | + |
Lines changed: 8 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 |
| - | |
10 |
| - | |
| 9 | + | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
14 |
| - | |
15 |
| - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
19 |
| - | |
20 |
| - | |
21 | 18 |
| |
22 | 19 |
| |
23 |
| - | |
| 20 | + | |
| 21 | + |
Lines changed: 3 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| 7 | + | |
7 | 8 |
| |
8 | 9 |
| |
9 |
| - | |
10 |
| - | |
11 |
| - | |
| 10 | + | |
12 | 11 |
| |
13 | 12 |
| |
14 | 13 |
| |
15 | 14 |
| |
16 | 15 |
| |
17 |
| - | |
18 |
| - | |
19 |
| - | |
20 | 16 |
| |
21 | 17 |
| |
22 |
| - | |
23 |
| - | |
| 18 | + |
0 commit comments
Comments
(0)