Skip to content

Commit a51436c

Browse files
committed
test: fix flaky test-heapdump-http2
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]>
1 parent a02de1b commit a51436c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/pummel/test-heapdump-http2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const http2 = require('http2');
1414

1515
const server = http2.createServer();
1616
server.on('stream', (stream) => {
17-
stream.respondWithFile(__filename);
17+
stream.respondWithFile(process.execPath);
1818
});
1919
server.listen(0, () => {
2020
const client = http2.connect(`http://localhost:${server.address().port}`);

0 commit comments

Comments
 (0)