From 3244ae36da4748358f56bb327e42d715e85d56ef Mon Sep 17 00:00:00 2001 From: Tarun Batra Date: Sun, 16 Apr 2017 20:07:19 +0530 Subject: [PATCH] test: remove common.PORT from test-cluster*.js PR-URL: https://github.com/nodejs/node/pull/12441 Ref: https://github.com/nodejs/node/issues/12376 Reviewed-By: Rich Trott Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca Reviewed-By: Santiago Gimeno Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-cluster-disconnect-leak.js | 2 +- test/parallel/test-cluster-disconnect-race.js | 2 +- test/parallel/test-cluster-process-disconnect.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-cluster-disconnect-leak.js b/test/parallel/test-cluster-disconnect-leak.js index a4916c95ba..45539367ab 100644 --- a/test/parallel/test-cluster-disconnect-leak.js +++ b/test/parallel/test-cluster-disconnect-leak.js @@ -26,4 +26,4 @@ if (cluster.isMaster) { const server = net.createServer(); -server.listen(common.PORT); +server.listen(0); diff --git a/test/parallel/test-cluster-disconnect-race.js b/test/parallel/test-cluster-disconnect-race.js index 09966cbab8..7bb66ced36 100644 --- a/test/parallel/test-cluster-disconnect-race.js +++ b/test/parallel/test-cluster-disconnect-race.js @@ -34,6 +34,6 @@ if (cluster.isMaster) { const server = net.createServer(); -server.listen(common.PORT, function() { +server.listen(0, function() { process.send('listening'); }); diff --git a/test/parallel/test-cluster-process-disconnect.js b/test/parallel/test-cluster-process-disconnect.js index f83dd00949..2174d118c3 100644 --- a/test/parallel/test-cluster-process-disconnect.js +++ b/test/parallel/test-cluster-process-disconnect.js @@ -12,7 +12,7 @@ if (cluster.isMaster) { } else { const net = require('net'); const server = net.createServer(); - server.listen(common.PORT, common.mustCall(() => { + server.listen(0, common.mustCall(() => { process.disconnect(); })); }