diff --git a/test/parallel/test-tls-client-abort.js b/test/parallel/test-tls-client-abort.js index 5b1e6eb7fbab9c..bd5db779785de1 100644 --- a/test/parallel/test-tls-client-abort.js +++ b/test/parallel/test-tls-client-abort.js @@ -14,7 +14,7 @@ const path = require('path'); const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')); const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')); -const conn = tls.connect({cert, key, port: common.PORT}, common.mustNotCall()); +const conn = tls.connect({cert, key, port: 0}, common.mustNotCall()); conn.on('error', function() { }); assert.doesNotThrow(function() { diff --git a/test/parallel/test-tls-client-abort2.js b/test/parallel/test-tls-client-abort2.js index 3698db7a3cf6d0..521ef6bee782e5 100644 --- a/test/parallel/test-tls-client-abort2.js +++ b/test/parallel/test-tls-client-abort2.js @@ -8,7 +8,7 @@ if (!common.hasCrypto) { } const tls = require('tls'); -const conn = tls.connect(common.PORT, common.mustNotCall()); +const conn = tls.connect(0, common.mustNotCall()); conn.on('error', common.mustCall(function() { assert.doesNotThrow(function() { conn.destroy();