diff options
author | Sakthipriyan Vairamani <thechargingvolcano@gmail.com> | 2015-08-02 17:24:40 +0530 |
---|---|---|
committer | Sakthipriyan Vairamani <thechargingvolcano@gmail.com> | 2015-08-03 23:04:47 +0530 |
commit | 64cf71195c83a2ff06319cf8719ff31058c9ff80 (patch) | |
tree | 0f15aed94ba68a44e20243633a56235b71d2b669 /test/parallel/test-net-better-error-messages-port-hostname.js | |
parent | 80a1cf742599ef52235171e2e32f615b6b611007 (diff) | |
download | android-node-v8-64cf71195c83a2ff06319cf8719ff31058c9ff80.tar.gz android-node-v8-64cf71195c83a2ff06319cf8719ff31058c9ff80.tar.bz2 android-node-v8-64cf71195c83a2ff06319cf8719ff31058c9ff80.zip |
test: change the hostname to an invalid name
In my Ubuntu 14.04.2 LTS machine, it tries to resolve the name
'blah.blah' and it fails with ETIMEOUT instead of ENOTFOUND. This patch
changes the hostname to "...", an invalid name, so that it will fail
immediately.
PR-URL: https://github.com/nodejs/io.js/pull/2287
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Diffstat (limited to 'test/parallel/test-net-better-error-messages-port-hostname.js')
-rw-r--r-- | test/parallel/test-net-better-error-messages-port-hostname.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-net-better-error-messages-port-hostname.js b/test/parallel/test-net-better-error-messages-port-hostname.js index 9335f6b07a..bdca6c2b3c 100644 --- a/test/parallel/test-net-better-error-messages-port-hostname.js +++ b/test/parallel/test-net-better-error-messages-port-hostname.js @@ -3,12 +3,12 @@ var common = require('../common'); var net = require('net'); var assert = require('assert'); -var c = net.createConnection(common.PORT, 'blah.blah'); +var c = net.createConnection(common.PORT, '...'); c.on('connect', assert.fail); c.on('error', common.mustCall(function(e) { assert.equal(e.code, 'ENOTFOUND'); assert.equal(e.port, common.PORT); - assert.equal(e.hostname, 'blah.blah'); + assert.equal(e.hostname, '...'); })); |