From f114e351158b6fd631edeb81dceb1f3fbe1e45d9 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Fri, 29 Oct 2021 20:18:37 +0200 Subject: [PATCH] test: deflake http2-cancel-while-client-reading Add missing `'error'` event handler. Fixes: https://github.com/nodejs/node/issues/40610 PR-URL: https://github.com/nodejs/node/pull/40659 Reviewed-By: Matteo Collina Reviewed-By: Rich Trott --- test/parallel/test-http2-cancel-while-client-reading.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/parallel/test-http2-cancel-while-client-reading.js b/test/parallel/test-http2-cancel-while-client-reading.js index 0605a02e116626..189e128e6667ef 100644 --- a/test/parallel/test-http2-cancel-while-client-reading.js +++ b/test/parallel/test-http2-cancel-while-client-reading.js @@ -20,6 +20,7 @@ server.on('stream', common.mustCall(function(stream) { client_stream.pause(); client_stream.close(http2.constants.NGHTTP2_CANCEL); }); + stream.on('error', () => {}); })); server.listen(0, function() {