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 cd17314

Browse files
authored andcommitted
dns: fix test suite part 2
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 9da76fd commit cd17314

File tree

14 files changed

+16
-12
lines changed
  • test
    • parallel
      • test-http-localaddress.js
      • test-http-upgrade-client.js
      • test-http2-connect-options.js
      • test-https-localaddress.js
      • test-net-dns-lookup.js
      • test-net-remote-address-port.js
      • test-tcp-wrap-listen.js
      • test-timers-socket-timeout-removes-other-socket-unref-timer.js
      • test-tls-client-getephemeralkeyinfo.js
      • test-tls-client-mindhsize.js
      • test-tls-wrap-econnreset-localaddress.js
    • pummel
      • test-http-upload-timeout.js
      • test-net-pingpong.js
    • sequential
      • test-inspector-open.js

14 files changed

+16
-12
lines changed

test/parallel/test-http-localaddress.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const server = http.createServer((req, res) => {
4242
server.listen(0, '127.0.0.1', () => {
4343
const options = { host: 'localhost',
4444
port: server.address().port,
45+
family: 4,
4546
path: '/',
4647
method: 'GET',
4748
localAddress: '127.0.0.2' };

test/parallel/test-http-upgrade-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const server = net.createServer(function(c) {
4949
});
5050
});
5151

52-
server.listen(0, '127.0.0.1', common.mustCall(function() {
52+
server.listen(0, common.mustCall(function() {
5353
const port = this.address().port;
5454
const headers = [
5555
{

test/parallel/test-http2-connect-options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const server = http2.createServer((req, res) => {
2222
});
2323

2424
server.listen(0, '127.0.0.1', common.mustCall(() => {
25-
const options = { localAddress: '127.0.0.2' };
25+
const options = { localAddress: '127.0.0.2', family: 4 };
2626

2727
const client = http2.connect(
2828
'http://localhost:' + server.address().port,

test/parallel/test-https-localaddress.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ server.listen(0, '127.0.0.1', function() {
5252
const options = {
5353
host: 'localhost',
5454
port: this.address().port,
55+
family: 4,
5556
path: '/',
5657
method: 'GET',
5758
localAddress: '127.0.0.2',

test/parallel/test-net-dns-lookup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const server = net.createServer(function(client) {
2929
server.close();
3030
});
3131

32-
server.listen(0, '127.0.0.1', common.mustCall(function() {
32+
server.listen(0, common.mustCall(function() {
3333
net.connect(this.address().port, 'localhost')
3434
.on('lookup', common.mustCall(function(err, ip, type, host) {
3535
assert.strictEqual(err, null);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ const server = net.createServer(common.mustCall(function(socket) {
4848
socket.resume();
4949
}, 2));
5050

51-
server.listen(0, 'localhost', function() {
52-
const client = net.createConnection(this.address().port, 'localhost');
51+
server.listen(0, function() {
52+
const client = net.createConnection(this.address().port, '127.0.0.1');
5353
const client2 = net.createConnection(this.address().port);
5454
client.on('connect', function() {
5555
assert.ok(remoteAddrCandidates.includes(client.remoteAddress));

test/parallel/test-tcp-wrap-listen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const {
1414

1515
const server = new TCP(TCPConstants.SOCKET);
1616

17-
const r = server.bind('0.0.0.0', 0);
17+
const r = server.bind(0);
1818
assert.strictEqual(r, 0);
1919
let port = {};
2020
server.getsockname(port);

test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const server = net.createServer(function onClient(client) {
2828
}
2929
});
3030

31-
server.listen(0, common.localhostIPv4, common.mustCall(() => {
31+
server.listen(0, common.mustCall(() => {
3232
const countdown = new Countdown(2, () => server.close());
3333

3434
{

test/parallel/test-tls-client-getephemeralkeyinfo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function test(size, type, name, cipher) {
3737

3838
server.on('close', common.mustSucceed());
3939

40-
server.listen(0, '127.0.0.1', common.mustCall(() => {
40+
server.listen(0, common.mustCall(() => {
4141
const client = tls.connect({
4242
port: server.address().port,
4343
rejectUnauthorized: false

test/parallel/test-tls-client-mindhsize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function test(size, err, next) {
3434
if (next) next();
3535
});
3636

37-
server.listen(0, '127.0.0.1', function() {
37+
server.listen(0, function() {
3838
// Client set minimum DH parameter size to 2048 bits so that
3939
// it fails when it make a connection to the tls server where
4040
// dhparams is 1024 bits

0 commit comments

Comments
(0)