diff --git a/test/parallel/test-tls-connect-address-family.js b/test/parallel/test-tls-connect-address-family.js index 05e81304b6a379..aae1fc7bfdc968 100644 --- a/test/parallel/test-tls-connect-address-family.js +++ b/test/parallel/test-tls-connect-address-family.js @@ -14,10 +14,10 @@ function runTest() { const ciphers = 'AECDH-NULL-SHA'; tls.createServer({ ciphers }, common.mustCall(function() { this.close(); - })).listen(common.PORT, '::1', common.mustCall(function() { + })).listen(0, '::1', common.mustCall(function() { const options = { host: 'localhost', - port: common.PORT, + port: this.address().port, family: 6, ciphers: ciphers, rejectUnauthorized: false,