Skip to content

Commit 71a8dc2

Browse files
committed
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: [nodejs#12376](nodejs#12376)
1 parent c3c045a commit 71a8dc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-tls-connect.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const path = require('path');
3535
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
3636
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
3737

38-
const options = { cert: cert, key: key, port: common.PORT };
38+
const options = { cert: cert, key: key, port: 0 };
3939
const conn = tls.connect(options, common.mustNotCall());
4040

4141
conn.on('error', common.mustCall());
@@ -49,7 +49,7 @@ const path = require('path');
4949
const conn = tls.connect({
5050
cert: cert,
5151
key: key,
52-
port: common.PORT,
52+
port: 0,
5353
ciphers: 'rick-128-roll'
5454
}, common.mustNotCall());
5555

0 commit comments

Comments
 (0)