diff --git a/test/parallel/test-cluster-disconnect-leak.js b/test/parallel/test-cluster-disconnect-leak.js index a4916c95ba4ea7..45539367aba5c8 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 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(); })); }