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: #15742
Ref: #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 MylesBorins committed Oct 7, 2017
1 parent 6ef33fb commit 0129980
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 0129980

Please sign in to comment.