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

PR-URL: https://github.com/nodejs/node/pull/34603
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Rich Trott authored and Anna Henningsen committed 2020-09-22 19:55:06 +02:00
1 parent 4dbc787a2f
commit 7eb80403b5
1 file changed
+6 -3
+6 -3
View File
@@ -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');