diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2016-07-02 10:08:26 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2016-07-04 15:32:55 +0200 |
commit | f47c394d75089dcb6f936fa501f6fe5820e38eab (patch) | |
tree | f899abdf7653a3bf60500636bfec26c9e7b7401f /test | |
parent | b3ec2432a1c814b9ff8ae9f74cd94a8ae93d70c2 (diff) | |
download | android-node-v8-f47c394d75089dcb6f936fa501f6fe5820e38eab.tar.gz android-node-v8-f47c394d75089dcb6f936fa501f6fe5820e38eab.tar.bz2 android-node-v8-f47c394d75089dcb6f936fa501f6fe5820e38eab.zip |
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>
Diffstat (limited to 'test')
-rw-r--r-- | test/sequential/test-net-GH-5504.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sequential/test-net-GH-5504.js b/test/sequential/test-net-GH-5504.js index 0121f3bf25..e760c26c29 100644 --- a/test/sequential/test-net-GH-5504.js +++ b/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(); |