Skip to content

Commit cd12cfd

Browse files
bnoordhuisMyles Borins
authored and
Myles Borins
committed
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: #6611 PR-URL: #7524 Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
1 parent e4007cb commit cd12cfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ function server() {
3030
console.error('_socketEnd');
3131
});
3232
socket.write(content);
33-
}).listen(common.PORT, function() {
33+
}).listen(common.PORT, common.localhostIPv4, function() {
3434
console.log('listening');
3535
});
3636
}
3737

3838
function client() {
3939
var net = require('net');
4040
var client = net.connect({
41-
host: 'localhost',
41+
host: common.localhostIPv4,
4242
port: common.PORT
4343
}, function() {
4444
client.destroy();

0 commit comments

Comments
 (0)