From 6582b1948885e80498fb678c2915b2c402a5f63c Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 5 May 2025 23:32:09 +0200 Subject: [PATCH] test: reduce flakiness in test-heapdump-http2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By the time the response event is emitted on the client's side, the file may have already been fully piped and the stream pipe may have been destroyed, so the test should not look for the stream pipe in the snapshot. PR-URL: https://github.com/nodejs/node/pull/58148 Reviewed-By: Juan José Arboleda Reviewed-By: Luigi Pinca --- test/pummel/test-heapdump-http2.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test/pummel/test-heapdump-http2.js b/test/pummel/test-heapdump-http2.js index c9218723792..a3eccaecef4 100644 --- a/test/pummel/test-heapdump-http2.js +++ b/test/pummel/test-heapdump-http2.js @@ -56,14 +56,11 @@ server.listen(0, () => { ], }, ], { loose: true }); - // `Node / StreamPipe` (C++) -> StreamPipe (JS) - state.validateSnapshotNodes('Node / StreamPipe', [ - { - children: [ - { node_name: 'StreamPipe', edge_name: 'native_to_javascript' }, - ], - }, - ]); + + // We don't necessarily have Node / StreamPipe here because by the time the + // response event is emitted, the file may have already been fully piped here + // and the stream pipe may have been destroyed. + // `Node / Http2Session` (C++) -> Http2Session (JS) state.validateSnapshotNodes('Node / Http2Session', [ {