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.

PR-URL: #15319
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
addaleax authored and jasnell committed Sep 20, 2017
1 parent 94e2b5c commit a2c335b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/parallel/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 a2c335b

Please sign in to comment.