From 02c7991907994ea163db86243eccab5538044556 Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Mon, 18 Jul 2016 11:42:40 +0100 Subject: [PATCH] test: avoid connecting to :: in test-net-timeout This test tries to connect to :: or 0.0.0.0, which resolves to localhost on some platforms but not others. Change to specify localhost. --- test/gc/test-net-timeout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gc/test-net-timeout.js b/test/gc/test-net-timeout.js index 2645ccc5038d91..ec73fb5d56bd32 100644 --- a/test/gc/test-net-timeout.js +++ b/test/gc/test-net-timeout.js @@ -1,4 +1,5 @@ 'use strict'; +const common = require('../common'); // just like test/gc/http-client-timeout.js, // but using a net server/client instead @@ -19,7 +20,6 @@ function serverHandler(sock) { const net = require('net'); const weak = require('weak'); -require('../common'); const assert = require('assert'); const todo = 500; let done = 0; @@ -29,7 +29,7 @@ let countGC = 0; console.log('We should do ' + todo + ' requests'); var server = net.createServer(serverHandler); -server.listen(0, getall); +server.listen(0, common.localhostIPv4, getall); function getall() { if (count >= todo)