From 30da3323140cf444c5d88f85847ea0b53e09ade0 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 17 Jul 2020 14:53:41 -0700 Subject: [PATCH] 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 Ref: https://github.com/nodejs/node/issues/34389#issuecomment-659297173 Fixes: https://github.com/nodejs/node/issues/34389 PR-URL: https://github.com/nodejs/node/pull/34415 Refs: https://github.com/nodejs/node/issues/34389 Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- test/pummel/test-heapdump-http2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pummel/test-heapdump-http2.js b/test/pummel/test-heapdump-http2.js index b3d819edaef91a..fe11dcfb2f44bb 100644 --- a/test/pummel/test-heapdump-http2.js +++ b/test/pummel/test-heapdump-http2.js @@ -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}`);