From 64cf71195c83a2ff06319cf8719ff31058c9ff80 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Sun, 2 Aug 2015 17:24:40 +0530 Subject: [PATCH] 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 Reviewed-By: Evan Lucas --- test/parallel/test-net-better-error-messages-port-hostname.js | 4 ++-- 1 file 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 9335f6b07a6625..bdca6c2b3ca00d 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, '...'); }));