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(); })); }