From 554b562d2b692218e5045d1817f07e4213658228 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 2749629303b979..fbbbb9e66fa054 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;