Skip to content

Commit 22ea3a8

Browse files
TrottMylesBorins
authored andcommitted
test: remove common.PORT from test-tlswrap
`test/async-hooks/test/test-tlswrap.js` uses `common.PORT` but async-hooks tests are run in parallel. Another test using port 0 could result in a port collision. Remove `common.PORT` from the test. PR-URL: #15742 Ref: #14404 (comment) Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 3f12109 commit 22ea3a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/async-hooks/test-tlswrap.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ const server = tls
2525
})
2626
.on('listening', common.mustCall(onlistening))
2727
.on('secureConnection', common.mustCall(onsecureConnection))
28-
.listen(common.PORT);
28+
.listen(0);
2929

3030
let svr, client;
3131
function onlistening() {
3232
//
3333
// Creating client and connecting it to server
3434
//
3535
tls
36-
.connect(common.PORT, { rejectUnauthorized: false })
36+
.connect(server.address().port, { rejectUnauthorized: false })
3737
.on('secureConnect', common.mustCall(onsecureConnect));
3838

3939
const as = hooks.activitiesOfTypes('TLSWRAP');

0 commit comments

Comments
 (0)