Browse Source

test: listen on and connect to 127.0.0.1

Avoid transient DNS issues in test sequential/test-net-GH-5504 by using
the IP address instead of the 'localhost' host name.

Fixes: https://github.com/nodejs/node/issues/6611
PR-URL: https://github.com/nodejs/node/pull/7524
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
v7.x
Ben Noordhuis 8 years ago
parent
commit
f47c394d75
  1. 4
      test/sequential/test-net-GH-5504.js

4
test/sequential/test-net-GH-5504.js

@ -29,7 +29,7 @@ function server() {
console.error('_socketEnd');
});
socket.write(content);
}).listen(common.PORT, function() {
}).listen(common.PORT, common.localhostIPv4, function() {
console.log('listening');
});
}
@ -37,7 +37,7 @@ function server() {
function client() {
var net = require('net');
var client = net.connect({
host: 'localhost',
host: common.localhostIPv4,
port: common.PORT
}, function() {
client.destroy();

Loading…
Cancel
Save