Commit 7b60b8f
test: fix flakiness of stringbytes-external
The tests used to rely on precise timing of when a JavaScript object
would be garbage collected to ensure that there is enough memory
available on the system. Switch the test to use a malloc/free pair
instead.
Ref: #5945
Ref: #6039
Ref: #6073
PR-URL: #6705
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent cc4c518 commit 7b60b8fCopy full SHA for 7b60b8f
File tree
Expand file treeCollapse file tree
11 files changed
+99
-49
lines changedOpen diff view settings
Filter options
- test
- addons/stringbytes-external-exceed-max
Expand file treeCollapse file tree
11 files changed
+99
-49
lines changedOpen diff view settings
Collapse file
+3-1Lines changed: 3 additions & 1 deletion
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
| 13 | + |
| 14 | + |
| 15 | + |
14 | 16 | |
15 | 17 | |
16 | 18 | |
|
Collapse file
test/addons/stringbytes-external-exceed-max/binding.cc
Copy file name to clipboard+24Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
Collapse file
test/addons/stringbytes-external-exceed-max/binding.gyp
Copy file name to clipboard+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
Collapse file
…llel/test-stringbytes-external-at-max.js …-max/test-stringbytes-external-at-max.jstest/parallel/test-stringbytes-external-at-max.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js test/parallel/test-stringbytes-external-at-max.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js
Copy file name to clipboard+8-6Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | 2 | |
4 | | - |
| 3 | + |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
| ||
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | | - |
18 | 17 | |
19 | 18 | |
20 | 19 | |
21 | | - |
22 | | - |
23 | | - |
24 | 20 | |
25 | 21 | |
26 | 22 | |
27 | 23 | |
28 | 24 | |
29 | 25 | |
30 | 26 | |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
31 | 33 | |
32 | 34 | |
Collapse file
…gbytes-external-exceed-max-by-1-ascii.js …gbytes-external-exceed-max-by-1-ascii.jstest/sequential/test-stringbytes-external-exceed-max-by-1-ascii.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js test/sequential/test-stringbytes-external-exceed-max-by-1-ascii.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js
Copy file name to clipboard+8-6Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | 2 | |
4 | | - |
| 3 | + |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
14 | 13 | |
15 | 14 | |
16 | 15 | |
17 | 16 | |
18 | 17 | |
19 | 18 | |
20 | 19 | |
21 | | - |
22 | | - |
23 | | - |
24 | 20 | |
25 | 21 | |
26 | 22 | |
27 | 23 | |
28 | 24 | |
29 | 25 | |
30 | 26 | |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
31 | 33 | |
32 | 34 | |
33 | 35 | |
Collapse file
…bytes-external-exceed-max-by-1-base64.js …bytes-external-exceed-max-by-1-base64.jstest/sequential/test-stringbytes-external-exceed-max-by-1-base64.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js test/sequential/test-stringbytes-external-exceed-max-by-1-base64.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js
Copy file name to clipboard+8-6Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | 2 | |
4 | | - |
| 3 | + |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
14 | 13 | |
15 | 14 | |
16 | 15 | |
17 | 16 | |
18 | 17 | |
19 | 18 | |
20 | 19 | |
21 | | - |
22 | | - |
23 | | - |
24 | 20 | |
25 | 21 | |
26 | 22 | |
27 | 23 | |
28 | 24 | |
29 | 25 | |
30 | 26 | |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
31 | 33 | |
32 | 34 | |
33 | 35 | |
Collapse file
…bytes-external-exceed-max-by-1-binary.js …bytes-external-exceed-max-by-1-binary.jstest/sequential/test-stringbytes-external-exceed-max-by-1-binary.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js test/sequential/test-stringbytes-external-exceed-max-by-1-binary.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js
Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js+8-6Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | 2 | |
4 | | - |
| 3 | + |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
14 | 13 | |
15 | 14 | |
16 | 15 | |
17 | 16 | |
18 | 17 | |
19 | 18 | |
20 | 19 | |
21 | | - |
22 | | - |
23 | | - |
24 | 20 | |
25 | 21 | |
26 | 22 | |
27 | 23 | |
28 | 24 | |
29 | 25 | |
30 | 26 | |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
31 | 33 | |
32 | 34 | |
33 | 35 | |
|
Collapse file
…ingbytes-external-exceed-max-by-1-hex.js …ingbytes-external-exceed-max-by-1-hex.jstest/sequential/test-stringbytes-external-exceed-max-by-1-hex.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js
Copy file name to clipboard+8-6Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | 2 | |
4 | | - |
| 3 | + |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
14 | 13 | |
15 | 14 | |
16 | 15 | |
17 | 16 | |
18 | 17 | |
19 | 18 | |
20 | 19 | |
21 | | - |
22 | | - |
23 | | - |
24 | 20 | |
25 | 21 | |
26 | 22 | |
27 | 23 | |
28 | 24 | |
29 | 25 | |
30 | 26 | |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
31 | 33 | |
32 | 34 | |
33 | 35 | |
Collapse file
…ngbytes-external-exceed-max-by-1-utf8.js …ngbytes-external-exceed-max-by-1-utf8.jstest/sequential/test-stringbytes-external-exceed-max-by-1-utf8.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js test/sequential/test-stringbytes-external-exceed-max-by-1-utf8.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js
Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js+8-6Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | 2 | |
4 | | - |
| 3 | + |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
14 | 13 | |
15 | 14 | |
16 | 15 | |
17 | 16 | |
18 | 17 | |
19 | 18 | |
20 | 19 | |
21 | | - |
22 | | - |
23 | | - |
24 | 20 | |
25 | 21 | |
26 | 22 | |
27 | 23 | |
28 | 24 | |
29 | 25 | |
30 | 26 | |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
31 | 33 | |
32 | 34 | |
33 | 35 | |
|
Collapse file
…-stringbytes-external-exceed-max-by-2.js …-stringbytes-external-exceed-max-by-2.jstest/sequential/test-stringbytes-external-exceed-max-by-2.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js test/sequential/test-stringbytes-external-exceed-max-by-2.js renamed to test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js
Copy file name to clipboard+8-6Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | 2 | |
4 | | - |
| 3 | + |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
14 | 13 | |
15 | 14 | |
16 | 15 | |
17 | 16 | |
18 | 17 | |
19 | 18 | |
20 | 19 | |
21 | | - |
22 | | - |
23 | | - |
24 | 20 | |
25 | 21 | |
26 | 22 | |
27 | 23 | |
28 | 24 | |
29 | 25 | |
30 | 26 | |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
31 | 33 | |
32 | 34 | |
0 commit comments