diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 213e962683a..fb3d39e9f40 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -10,7 +10,6 @@ prefix parallel test-tick-processor : PASS,FLAKY [$system==linux] -test-process-getactivehandles : PASS,FLAKY test-tick-processor : PASS,FLAKY [$system==macos] diff --git a/test/parallel/test-process-getactivehandles.js b/test/parallel/test-process-getactivehandles.js index 96464cf3b22..e257439f7ba 100644 --- a/test/parallel/test-process-getactivehandles.js +++ b/test/parallel/test-process-getactivehandles.js @@ -10,13 +10,16 @@ var clients_counter = 0; const server = net.createServer(function listener(c) { connections.push(c); -}).listen(common.PORT, function makeConnections() { - for (var i = 0; i < NUM; i++) { - net.connect(common.PORT, function connected() { - clientConnected(this); - }); - } -}); +}).listen(common.PORT, makeConnection); + + +function makeConnection() { + if (clients_counter >= NUM) return; + net.connect(common.PORT, function connected() { + clientConnected(this); + makeConnection(); + }); +} function clientConnected(client) {