Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7b0b1ec

Browse files
authored andcommitted
dns: try to fix test suite for CI
PR-URL: #39987 Fixes: #31566 Refs: #6307 Refs: #20710 Refs: #38099 Reviewed-By: Antoine du Hamel Reviewed-By: Matteo Collina Reviewed-By: James M Snell Reviewed-By: Michael Dawson
1 parent 68e8c9a commit 7b0b1ec

File tree

1 file changed

+4
-7
lines changed
  • test/parallel
    • test-net-remote-address-port.js

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,17 @@ const net = require('net');
2727

2828
let conns_closed = 0;
2929

30-
const remoteAddrCandidates = [ common.localhostIPv4 ];
31-
if (common.hasIPv6) remoteAddrCandidates.push('::1', '::ffff:127.0.0.1');
30+
const remoteAddrCandidates = [ common.localhostIPv4,
31+
'::1',
32+
'::ffff:127.0.0.1' ];
3233

33-
const remoteFamilyCandidates = ['IPv4'];
34-
if (common.hasIPv6) remoteFamilyCandidates.push('IPv6');
34+
const remoteFamilyCandidates = ['IPv4', 'IPv6'];
3535

3636
const server = net.createServer(common.mustCall(function(socket) {
37-
// REM: assert.match(socket.remoteAddress,
38-
// REM: /^127\.0\.0\.1$|^::1$|^::ffff:127\.0\.0\.1$/);
3937
assert.ok(remoteAddrCandidates.includes(socket.remoteAddress),
4038
`Illformed remoteAddress: ${socket.remoteAddress}`);
4139
assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily),
4240
`Illformed remoteFamily: ${socket.remoteFamily}`);
43-
// REM: assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily));
4441
assert.ok(socket.remotePort);
4542
assert.notStrictEqual(socket.remotePort, this.address().port);
4643
socket.on('end', function() {

0 commit comments

Comments
(0)