Skip to content

Commit 64cf711

Browse files
committed
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: #2287 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Evan Lucas <[email protected]>
1 parent 80a1cf7 commit 64cf711

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-net-better-error-messages-port-hostname.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ var common = require('../common');
33
var net = require('net');
44
var assert = require('assert');
55

6-
var c = net.createConnection(common.PORT, 'blah.blah');
6+
var c = net.createConnection(common.PORT, '...');
77

88
c.on('connect', assert.fail);
99

1010
c.on('error', common.mustCall(function(e) {
1111
assert.equal(e.code, 'ENOTFOUND');
1212
assert.equal(e.port, common.PORT);
13-
assert.equal(e.hostname, 'blah.blah');
13+
assert.equal(e.hostname, '...');
1414
}));

0 commit comments

Comments
 (0)