Skip to content

Commit

Permalink
dns: trying to fix test-net-remote-address-port.js
Browse files Browse the repository at this point in the history
PR-URL: #39987
Fixes: #31566
Refs: #6307
Refs: #20710
Refs: #38099
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
treysis authored and nodejs-github-bot committed Sep 12, 2021
1 parent 5c79d5a commit 68e8c9a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/parallel/test-net-remote-address-port.js
Expand Up @@ -34,11 +34,13 @@ const remoteFamilyCandidates = ['IPv4'];
if (common.hasIPv6) remoteFamilyCandidates.push('IPv6');

const server = net.createServer(common.mustCall(function(socket) {
// Test to see real value in CI log
assert.match(socket.remoteAddress,
/^127\.0\.0\.1$|^::1$|^::ffff:127\.0\.0\.1$/);
// REM: assert.ok(remoteAddrCandidates.includes(socket.remoteAddress));
assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily));
// REM: assert.match(socket.remoteAddress,
// REM: /^127\.0\.0\.1$|^::1$|^::ffff:127\.0\.0\.1$/);
assert.ok(remoteAddrCandidates.includes(socket.remoteAddress),
`Illformed remoteAddress: ${socket.remoteAddress}`);
assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily),
`Illformed remoteFamily: ${socket.remoteFamily}`);
// REM: assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily));
assert.ok(socket.remotePort);
assert.notStrictEqual(socket.remotePort, this.address().port);
socket.on('end', function() {
Expand Down

0 comments on commit 68e8c9a

Please sign in to comment.