Skip to content
Permalink
Browse files

test: don't assume IPv6 in test-regress-nodejsGH-5727

test/parallel/test-regress-GH-5727 assumed that one of the
servers would be listening on IPv6. This breaks when the machine
running the test doesn't have IPv6. This commit builds the
connection key that is compared dynamically.

Refs: nodejs#5732
PR-URL: nodejs#6319
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
  • Loading branch information...
cjihrig authored and joelostrowski committed Apr 21, 2016
1 parent c6ef8ff commit 999645563ea473f03037aa1161af739aa754ef4d
Showing with 4 additions and 1 deletion.
  1. +4 −1 test/parallel/test-regress-GH-5727.js
@@ -7,7 +7,10 @@ const invalidPort = -1 >>> 0;
const errorMessage = /"port" argument must be \>= 0 and \< 65536/;

net.Server().listen(common.PORT, function() {
assert.equal(this._connectionKey, '6::::' + common.PORT);
const address = this.address();
const key = `${address.family.slice(-1)}:${address.address}:${common.PORT}`;

assert.equal(this._connectionKey, key);
this.close();
});

0 comments on commit 9996455

Please sign in to comment.
You can’t perform that action at this time.