Skip to content

Commit

Permalink
test: fix sequential/test-async-wrap-getasyncid
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
addaleax committed Sep 12, 2017
1 parent 640b206 commit 866da32
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/sequential/test-async-wrap-getasyncid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}


Expand Down

0 comments on commit 866da32

Please sign in to comment.