From 41057feb3d7e11cab9111d2beae4056f9c955760 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 27 Sep 2018 15:45:08 -0700 Subject: [PATCH] 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 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Michael Dawson Reviewed-By: Luigi Pinca --- test/sequential/test-gc-net-timeout.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/sequential/test-gc-net-timeout.js b/test/sequential/test-gc-net-timeout.js index 9651e4a2a686dc..51d9b8ca09bbbc 100644 --- a/test/sequential/test-gc-net-timeout.js +++ b/test/sequential/test-gc-net-timeout.js @@ -41,7 +41,6 @@ function getall() { req.setTimeout(10, function() { req.destroy(); done++; - global.gc(); }); count++;