Skip to content

Commit

Permalink
test: remove common.PORT from test-tlswrap
Browse files Browse the repository at this point in the history
`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: nodejs/node#15742
Ref: nodejs/node#14404 (comment)
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>
  • Loading branch information
Trott authored and addaleax committed Oct 11, 2017
1 parent 1df0818 commit fcdc14d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/async-hooks/test-tlswrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ const server = tls
})
.on('listening', common.mustCall(onlistening))
.on('secureConnection', common.mustCall(onsecureConnection))
.listen(common.PORT);
.listen(0);

let svr, client;
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');
Expand Down

0 comments on commit fcdc14d

Please sign in to comment.