test: reduce flakiness in test-heapdump-http2

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 <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Joyee Cheung 2025-05-05 23:32:09 +02:00 committed by Antoine du Hamel
parent 1bd7a2edf9
commit 6582b19488
No known key found for this signature in database
GPG Key ID: 21D900FFDB233756

View File

@ -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', [
{