From 0717bc58a50a105562ba66b85b166a699807bd33 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 2 Oct 2017 14:37:32 -0700 Subject: [PATCH] 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. Refs: https://github.com/nodejs/node/issues/14404#issuecomment-333672346 --- test/async-hooks/test-tlswrap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/async-hooks/test-tlswrap.js b/test/async-hooks/test-tlswrap.js index 3876b860ca876a..7d92b603f3e18a 100644 --- a/test/async-hooks/test-tlswrap.js +++ b/test/async-hooks/test-tlswrap.js @@ -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');