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 <[email protected]>
Ref: #34389 (comment)
Fixes: #34389

PR-URL: #34415
Refs: #34389
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Jul 27, 2020
1 parent 4a828c6 commit 30da332
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 30da332

Please sign in to comment.