From 866da32343f561f22624bc5ac0043d88b43788fb Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 9 Sep 2017 22:41:34 +0200 Subject: [PATCH] test: fix sequential/test-async-wrap-getasyncid Previously, this test would contain a DNS query that timed out after 60 seconds, thus occupying one of the parallel test slots for that period. Fix that by creating a new channel for that request, and cancelling it immediately. --- test/sequential/test-async-wrap-getasyncid.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/sequential/test-async-wrap-getasyncid.js b/test/sequential/test-async-wrap-getasyncid.js index 95317f711c9907..801aa2f5013045 100644 --- a/test/sequential/test-async-wrap-getasyncid.js +++ b/test/sequential/test-async-wrap-getasyncid.js @@ -56,8 +56,12 @@ function testInitialized(req, ctor_name) { testInitialized(dns.lookup('www.google.com', () => {}), 'GetAddrInfoReqWrap'); testInitialized(dns.lookupService('::1', 22, () => {}), 'GetNameInfoReqWrap'); - testInitialized(dns.resolve6('::1', () => {}), 'QueryReqWrap'); - testInitialized(new cares.ChannelWrap(), 'ChannelWrap'); + + const resolver = new dns.Resolver(); + resolver.setServers(['127.0.0.1']); + testInitialized(resolver._handle, 'ChannelWrap'); + testInitialized(resolver.resolve6('::1', () => {}), 'QueryReqWrap'); + resolver.cancel(); }