From 8cf8208f486f4c2576487893cd356474b8e31f43 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 Refs: https://github.com/nodejs/node/issues/12376 PR_URL: https://github.com/nodejs/node/pull/12441 --- 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 4d72b1da806338..dddc12a3b5471e 100644 --- a/test/parallel/test-cluster-disconnect-leak.js +++ b/test/parallel/test-cluster-disconnect-leak.js @@ -24,4 +24,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 09966cbab84496..7bb66ced3663ef 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 f83dd0094998df..2174d118c3244a 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(); })); }