Skip to content

Commit bebd7b2

Browse files
Trotttargos
authored andcommitted
test: fix flaky test-gc-net-timeout
There's a global.gc() invoked in an interval, and a second one in a req.setTimeout() callback. Remove the one in the callback. I'm not sure how competing global.gc() calls might result in a deadlock, but it seems plausible and empirical testing confirms that it makes the test reliable. Fixes: #23067 PR-URL: #23139 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent efeb49d commit bebd7b2

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

test/sequential/test-gc-net-timeout.js

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ function getall() {
4141
req.setTimeout(10, function() {
4242
req.destroy();
4343
done++;
44-
global.gc();
4544
});
4645

4746
count++;

0 commit comments

Comments
 (0)