From b157756cdc4181032807c5bb484f0872638da6ed Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 20 Jan 2019 16:38:39 -0800 Subject: [PATCH] test: replace common.PORT with `0` in https renegotiation test Repeated use of common.PORT was resulting in sporadic failures on some operating systems. --- test/pummel/test-https-ci-reneg-attack.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/pummel/test-https-ci-reneg-attack.js b/test/pummel/test-https-ci-reneg-attack.js index fad8cd992dd35d..f34010b1e54253 100644 --- a/test/pummel/test-https-ci-reneg-attack.js +++ b/test/pummel/test-https-ci-reneg-attack.js @@ -65,8 +65,9 @@ function test(next) { res.end('ok'); }); - server.listen(common.PORT, function() { - const args = (`s_client -connect 127.0.0.1:${common.PORT}`).split(' '); + server.listen(0, function() { + const cmd = `s_client -connect 127.0.0.1:${server.address().port}`; + const args = cmd.split(' '); const child = spawn(common.opensslCli, args); child.stdout.resume();