test: refactor test-async-wrap-getasyncid
So it does not use `common.PORT` anymore. PR-URL: https://github.com/nodejs/node/pull/18727 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This commit is contained in:
parent
eda702104b
commit
a865e8ba67
@ -267,9 +267,11 @@ if (common.hasCrypto) { // eslint-disable-line node-core/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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user