Skip to content

Commit

Permalink
test: refactor test-async-wrap-getasyncid
Browse files Browse the repository at this point in the history
So it does not use `common.PORT` anymore.

PR-URL: #18727
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
  • Loading branch information
santigimeno authored and MylesBorins committed Aug 17, 2018
1 parent 905c350 commit d7b657f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/sequential/test-async-wrap-getasyncid.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,11 @@ if (common.hasCrypto) { // eslint-disable-line crypto-check
testInitialized(handle, 'UDP');
testUninitialized(req, 'SendWrap');

handle.bind('0.0.0.0', common.PORT, undefined);
handle.bind('0.0.0.0', 0, undefined);
const addr = {};
handle.getsockname(addr);
req.address = '127.0.0.1';
req.port = common.PORT;
req.port = addr.port;
req.oncomplete = () => handle.close();
handle.send(req, [Buffer.alloc(1)], 1, req.port, req.address, true);
testInitialized(req, 'SendWrap');
Expand Down

0 comments on commit d7b657f

Please sign in to comment.