summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-01-20 16:38:39 -0800
committerRich Trott <rtrott@gmail.com>2019-01-22 18:47:10 -0800
commitc33d38b449fe7d2625eec6bedf3c9b891749f0cf (patch)
tree719c3d9bdf63c8428f405eecd0b6b4d87e9816c0 /test
parente3f917ef65336c4ef20829654341d77da4dfb84a (diff)
downloadandroid-node-v8-c33d38b449fe7d2625eec6bedf3c9b891749f0cf.tar.gz
android-node-v8-c33d38b449fe7d2625eec6bedf3c9b891749f0cf.tar.bz2
android-node-v8-c33d38b449fe7d2625eec6bedf3c9b891749f0cf.zip
test: replace common.PORT with `0` in https renegotiation test
Repeated use of common.PORT was resulting in sporadic failures on some operating systems. PR-URL: https://github.com/nodejs/node/pull/25599 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/pummel/test-https-ci-reneg-attack.js5
1 files 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 fad8cd992d..f34010b1e5 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();