Skip to content

Commit

Permalink
test: fix flaky test-gc-net-timeout
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and targos committed Oct 3, 2018
1 parent efeb49d commit bebd7b2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion test/sequential/test-gc-net-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function getall() {
req.setTimeout(10, function() {
req.destroy();
done++;
global.gc();
});

count++;
Expand Down

0 comments on commit bebd7b2

Please sign in to comment.