Browse Source

test: fix test-tls-connect-address-family

Use port 0 instead of common.PORT.

PR-URL: https://github.com/nodejs/node/pull/9573
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
v6
mkamakura 8 years ago
committed by Michaël Zasso
parent
commit
31d1a3f8a8
  1. 4
      test/parallel/test-tls-connect-address-family.js

4
test/parallel/test-tls-connect-address-family.js

@ -18,10 +18,10 @@ function runTest() {
const ciphers = 'AECDH-NULL-SHA'; const ciphers = 'AECDH-NULL-SHA';
tls.createServer({ ciphers }, common.mustCall(function() { tls.createServer({ ciphers }, common.mustCall(function() {
this.close(); this.close();
})).listen(common.PORT, '::1', common.mustCall(function() { })).listen(0, '::1', common.mustCall(function() {
const options = { const options = {
host: 'localhost', host: 'localhost',
port: common.PORT, port: this.address().port,
family: 6, family: 6,
ciphers: ciphers, ciphers: ciphers,
rejectUnauthorized: false, rejectUnauthorized: false,

Loading…
Cancel
Save