Skip to content

Commit 68e8c9a

Browse files
treysisnodejs-github-bot
authored andcommitted
dns: trying to fix test-net-remote-address-port.js
PR-URL: #39987 Fixes: #31566 Refs: #6307 Refs: #20710 Refs: #38099 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 5c79d5a commit 68e8c9a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/parallel/test-net-remote-address-port.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ const remoteFamilyCandidates = ['IPv4'];
3434
if (common.hasIPv6) remoteFamilyCandidates.push('IPv6');
3535

3636
const server = net.createServer(common.mustCall(function(socket) {
37-
// Test to see real value in CI log
38-
assert.match(socket.remoteAddress,
39-
/^127\.0\.0\.1$|^::1$|^::ffff:127\.0\.0\.1$/);
40-
// REM: assert.ok(remoteAddrCandidates.includes(socket.remoteAddress));
41-
assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily));
37+
// REM: assert.match(socket.remoteAddress,
38+
// REM: /^127\.0\.0\.1$|^::1$|^::ffff:127\.0\.0\.1$/);
39+
assert.ok(remoteAddrCandidates.includes(socket.remoteAddress),
40+
`Illformed remoteAddress: ${socket.remoteAddress}`);
41+
assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily),
42+
`Illformed remoteFamily: ${socket.remoteFamily}`);
43+
// REM: assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily));
4244
assert.ok(socket.remotePort);
4345
assert.notStrictEqual(socket.remotePort, this.address().port);
4446
socket.on('end', function() {

0 commit comments

Comments
 (0)