Skip to content

Commit

Permalink
test: fix flaky test-heapdump-http2
Browse files Browse the repository at this point in the history
Replace stream.respondWithFile(__filename) with
stream.respondWithFile(process.execPath). The test file is probably
small enough on some operating systems to be sent immediately, without
waiting for the receiving side to do anything.

The fix was figured out by addaleax.

Co-authored-by: Anna Henningsen <anna@addaleax.net>
Ref: #34389 (comment)
Fixes: #34389

PR-URL: #34415
Refs: #34389
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and addaleax committed Sep 22, 2020
1 parent e15dc5f commit cc26431
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/pummel/test-heapdump-http2.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const http2 = require('http2');

const server = http2.createServer();
server.on('stream', (stream) => {
stream.respondWithFile(__filename);
stream.respondWithFile(process.execPath);
});
server.listen(0, () => {
const client = http2.connect(`http://localhost:${server.address().port}`);
Expand Down

0 comments on commit cc26431

Please sign in to comment.