From dd6cd49a6c142b9ce1a0bc680a451887974a1fbd Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Mon, 5 Oct 2026 08:18:13 +0000 Subject: [PATCH] test: re-enable HTTP/2 churn test on Node.js 26, keep skipping on Node.js 22 nodejs/node#64850 (onread->IsFunction() assertion during session teardown) was fixed by nodejs/node#65116, which first shipped in Node.js v26.10.0. Restrict the Node.js 26 skip to versions before the fix so the test runs again on current 26.x and later. The v22.x backport (nodejs/node#66515) has not been released yet, so keep the test skipped on Node.js 22 until a release carries the fix. --- test/http2-request-never-settles.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/http2-request-never-settles.js b/test/http2-request-never-settles.js index 3a42a27290c..6d46f4c1ab4 100644 --- a/test/http2-request-never-settles.js +++ b/test/http2-request-never-settles.js @@ -11,10 +11,17 @@ const pem = require('@metcoder95/https-pem') const { Agent } = require('..') const nodeMajor = Number(process.versions.node.split('.')[0]) +const nodeMinor = Number(process.versions.node.split('.')[1]) const skipForMemoryCorruption = (process.platform === 'linux' && nodeMajor === 24) || nodeMajor === 25 -const skipForOnreadAssertion = nodeMajor === 26 +// nodejs/node#64850 (onread->IsFunction() assertion during session teardown) +// was fixed by nodejs/node#65116, which first shipped in Node.js v26.10.0. +// The v22.x backport (nodejs/node#66515) has not been released yet, so add a +// version gate here once a Node.js 22.x release carries the fix. +const skipForOnreadAssertion = + nodeMajor === 22 || + (nodeMajor === 26 && nodeMinor < 10) // completeRequestStream() runs on an h2 stream's 'close': // @@ -133,8 +140,9 @@ async function churningServer (rnd) { for (const seed of SEEDS) { test(`every h2 request settles under connection churn (seed ${seed})`, { - // https://github.com/nodejs/node/issues/64841 - // https://github.com/nodejs/node/issues/64850 + // https://github.com/nodejs/node/issues/64841 (still open, Node.js 24/25) + // nodejs/node#64850 was fixed in Node.js v26.10.0; the v22.x backport is + // still unreleased, so Node.js 22 and pre-fix 26.x keep skipping skip: (skipForMemoryCorruption || skipForOnreadAssertion) && 'Node.js has HTTP/2 session teardown crashes' }, async (t) => { const timer = setInterval(() => {}, 1000)