From 71a8dc22c302ca681712931aba0f26bb05424ecc Mon Sep 17 00:00:00 2001 From: Oky Antoro Date: Tue, 8 Aug 2017 20:15:58 +0700 Subject: [PATCH] test: use dynamic port in test-tls-connect.js Change common.PORT to dynamic port to prevent collision with other parallel test which use common.PORT Refs: [#12376](https://github.com/nodejs/node/issues/12376) --- test/parallel/test-tls-connect.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-connect.js b/test/parallel/test-tls-connect.js index 4b938e49bfc8cb..a157b5cb3929c6 100644 --- a/test/parallel/test-tls-connect.js +++ b/test/parallel/test-tls-connect.js @@ -35,7 +35,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 options = { cert: cert, key: key, port: common.PORT }; + const options = { cert: cert, key: key, port: 0 }; const conn = tls.connect(options, common.mustNotCall()); conn.on('error', common.mustCall()); @@ -49,7 +49,7 @@ const path = require('path'); const conn = tls.connect({ cert: cert, key: key, - port: common.PORT, + port: 0, ciphers: 'rick-128-roll' }, common.mustNotCall());