From 2d5378238935ad3b3bef2d4cef2f6427a5dec069 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Thu, 17 Aug 2017 19:18:06 +0200 Subject: [PATCH] test: fix async-hooks tests The 'test-graph.tcp' and 'test-tcpwrap' tests are using '::' as server address. This is mapped to localhost on Linux, but fails on Windows. PR-URL: https://github.com/nodejs/node/pull/14865 Reviewed-By: James M Snell Reviewed-By: Refael Ackermann --- test/async-hooks/test-graph.tcp.js | 2 +- test/async-hooks/test-tcpwrap.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/async-hooks/test-graph.tcp.js b/test/async-hooks/test-graph.tcp.js index 8726159907..2e0b387cbe 100644 --- a/test/async-hooks/test-graph.tcp.js +++ b/test/async-hooks/test-graph.tcp.js @@ -17,7 +17,7 @@ const server = net server.listen(common.PORT); -net.connect({ port: server.address().port, host: server.address().address }, +net.connect({ port: server.address().port, host: '::1' }, common.mustCall(onconnected)); function onlistening() {} diff --git a/test/async-hooks/test-tcpwrap.js b/test/async-hooks/test-tcpwrap.js index b4021753a0..1f4fc6af0d 100644 --- a/test/async-hooks/test-tcpwrap.js +++ b/test/async-hooks/test-tcpwrap.js @@ -38,7 +38,7 @@ const server = net // Calling net.connect creates another TCPWRAP synchronously { net.connect( - { port: server.address().port, host: server.address().address }, + { port: server.address().port, host: '::1' }, common.mustCall(onconnected)); const tcps = hooks.activitiesOfTypes('TCPWRAP'); assert.strictEqual(tcps.length, 2);