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.

Refs: nodejs#14404 (comment)
  • Loading branch information
Trott committed Oct 2, 2017
1 parent 7489141 commit 0717bc5
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 0717bc5

Please sign in to comment.