Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d883376

Browse filesBrowse 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
Copy full SHA for d883376

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/sequential/test-async-wrap-getasyncid.js
+4-2Lines changed: 4 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.