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: nodejs#18727
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
  • Loading branch information
santigimeno authored and addaleax committed Mar 5, 2018
1 parent 23107ba commit d883376
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 @@ -284,9 +284,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 d883376

Please sign in to comment.