From 5a0332ed311f03c402e2975b637cccbe595ec204 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 20 Jan 2019 18:40:02 -0800 Subject: [PATCH] test: remove potential race condition in https renegotiation test In test/pummel/test-https-ci-reneg-attack.js, there is a boolean that is causing a race condition on some operating systems. It is unnecessary. Remove it. PR-URL: https://github.com/nodejs/node/pull/25601 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- test/pummel/test-https-ci-reneg-attack.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/pummel/test-https-ci-reneg-attack.js b/test/pummel/test-https-ci-reneg-attack.js index f34010b1e54253..50e16192e1b1ca 100644 --- a/test/pummel/test-https-ci-reneg-attack.js +++ b/test/pummel/test-https-ci-reneg-attack.js @@ -52,15 +52,12 @@ function test(next) { key: fixtures.readSync('test_key.pem') }; - let seenError = false; - const server = https.createServer(options, function(req, res) { const conn = req.connection; conn.on('error', function(err) { console.error(`Caught exception: ${err}`); assert(/TLS session renegotiation attack/.test(err)); conn.destroy(); - seenError = true; }); res.end('ok'); }); @@ -78,7 +75,6 @@ function test(next) { let renegs = 0; child.stderr.on('data', function(data) { - if (seenError) return; handshakes += ((String(data)).match(/verify return:1/g) || []).length; if (handshakes === 2) spam(); renegs += ((String(data)).match(/RENEGOTIATING/g) || []).length;