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>
This commit is contained in:
parent
80a1cf7425
commit
64cf71195c
@ -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, '...');
|
||||
}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user