Skip to content

Commit

Permalink
test: add debugging for callbacks in test-https-foafssl.js
Browse files Browse the repository at this point in the history
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: #24397

PR-URL: #34603
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott authored and codebytere committed Aug 11, 2020
1 parent 4cd9c4f commit 27333b1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/parallel/test-https-foafssl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}));

Expand All @@ -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');
Expand Down

0 comments on commit 27333b1

Please sign in to comment.