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: https://github.com/nodejs/node/issues/23067

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Rich Trott authored and Michaël Zasso committed 2018-10-03 07:59:08 +02:00
1 parent efeb49d224
commit bebd7b2cdc
1 file changed
-1
-1
View File
@@ -41,7 +41,6 @@ function getall() {
req.setTimeout(10, function() {
req.destroy();
done++;
global.gc();
});
count++;