Skip to content

Commit d883376

Browse files
santigimenoaddaleax
authored andcommitted
test: refactor test-async-wrap-getasyncid
So it does not use `common.PORT` anymore. PR-URL: #18727 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
1 parent 23107ba commit d883376

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/sequential/test-async-wrap-getasyncid.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,11 @@ if (common.hasCrypto) { // eslint-disable-line crypto-check
284284
testInitialized(handle, 'UDP');
285285
testUninitialized(req, 'SendWrap');
286286

287-
handle.bind('0.0.0.0', common.PORT, undefined);
287+
handle.bind('0.0.0.0', 0, undefined);
288+
const addr = {};
289+
handle.getsockname(addr);
288290
req.address = '127.0.0.1';
289-
req.port = common.PORT;
291+
req.port = addr.port;
290292
req.oncomplete = () => handle.close();
291293
handle.send(req, [Buffer.alloc(1)], 1, req.port, req.address, true);
292294
testInitialized(req, 'SendWrap');

0 commit comments

Comments
 (0)