Skip to content

Commit

Permalink
test: change the hostname to an invalid name
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thefourtheye committed Aug 2, 2015
1 parent 9bac1db commit f1e6b18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-net-better-error-messages-port-hostname.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '...');
}));

0 comments on commit f1e6b18

Please sign in to comment.