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: https://github.com/nodejs/node/pull/15742 Ref: https://github.com/nodejs/node/issues/14404#issuecomment-333672346 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
9569ca8721
commit
ddbf07ab89
@ -25,7 +25,7 @@ const server = tls
|
||||
})
|
||||
.on('listening', common.mustCall(onlistening))
|
||||
.on('secureConnection', common.mustCall(onsecureConnection))
|
||||
.listen(common.PORT);
|
||||
.listen(0);
|
||||
|
||||
let svr, client;
|
||||
function onlistening() {
|
||||
@ -33,7 +33,7 @@ function onlistening() {
|
||||
// Creating client and connecting it to server
|
||||
//
|
||||
tls
|
||||
.connect(common.PORT, { rejectUnauthorized: false })
|
||||
.connect(server.address().port, { rejectUnauthorized: false })
|
||||
.on('secureConnect', common.mustCall(onsecureConnect));
|
||||
|
||||
const as = hooks.activitiesOfTypes('TLSWRAP');
|
||||
|
Loading…
x
Reference in New Issue
Block a user