diff --git a/test/async-hooks/test-graph.tcp.js b/test/async-hooks/test-graph.tcp.js index 87261599073..2e0b387cbea 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 b4021753a07..1f4fc6af0d6 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);