From 1a28fbe00dc4e1bf6a7b9422e43b62f0fcf7bdd8 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 2 Aug 2020 11:10:49 -0700 Subject: [PATCH 1/2] test: add debugging for test-https-foafssl.js The test is timing out once in a very long while on Windows CI. It is unclear where the test gets stuck, so add more debugging statements to try to locate it. Refs: https://github.com/nodejs/node/issues/24397 --- test/parallel/test-https-foafssl.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index 43057817043789..1841bc99c075b0 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -57,6 +57,7 @@ const server = https.createServer(options, common.mustCall(function(req, res) { assert.strictEqual(cert.modulus, modulus); res.writeHead(200, { 'content-type': 'text/plain' }); res.end(body); + console.log('sent response'); })); server.listen(0, function() { @@ -69,10 +70,12 @@ server.listen(0, function() { const client = spawn(common.opensslCli, args); client.stdout.on('data', function(data) { + console.log('response received'); const message = data.toString(); const contents = message.split(CRLF + CRLF).pop(); assert.strictEqual(body, contents); server.close(); + console.log('server closed'); }); client.stdin.write('GET /\n\n'); From 01407340d39e088b96eff3565467c8cf79da2357 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 2 Aug 2020 11:10:49 -0700 Subject: [PATCH 2/2] test: add debugging for callbacks in test-https-foafssl.js The test is timing out once in a very long while on Windows CI. It is unclear where the test gets stuck, so add more debugging statements to try to locate it. Refs: https://github.com/nodejs/node/issues/24397 --- test/parallel/test-https-foafssl.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index 1841bc99c075b0..ff2c7d4387ee1b 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -56,7 +56,7 @@ const server = https.createServer(options, common.mustCall(function(req, res) { assert.strictEqual(cert.exponent, exponent); assert.strictEqual(cert.modulus, modulus); res.writeHead(200, { 'content-type': 'text/plain' }); - res.end(body); + res.end(body, () => { console.log('stream finished'); }); console.log('sent response'); })); @@ -74,8 +74,11 @@ server.listen(0, function() { const message = data.toString(); const contents = message.split(CRLF + CRLF).pop(); assert.strictEqual(body, contents); - server.close(); - console.log('server closed'); + server.close((e) => { + assert.ifError(e); + console.log('server closed'); + }); + console.log('server.close() called'); }); client.stdin.write('GET /\n\n');