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>
This commit is contained in:
parent
b3ec2432a1
commit
f47c394d75
@ -29,7 +29,7 @@ function server() {
|
|||||||
console.error('_socketEnd');
|
console.error('_socketEnd');
|
||||||
});
|
});
|
||||||
socket.write(content);
|
socket.write(content);
|
||||||
}).listen(common.PORT, function() {
|
}).listen(common.PORT, common.localhostIPv4, function() {
|
||||||
console.log('listening');
|
console.log('listening');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ function server() {
|
|||||||
function client() {
|
function client() {
|
||||||
var net = require('net');
|
var net = require('net');
|
||||||
var client = net.connect({
|
var client = net.connect({
|
||||||
host: 'localhost',
|
host: common.localhostIPv4,
|
||||||
port: common.PORT
|
port: common.PORT
|
||||||
}, function() {
|
}, function() {
|
||||||
client.destroy();
|
client.destroy();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user