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);