Skip to content

Commit d2c2ac2

Browse files
authored
test: re-enable HTTP/2 churn test on Node.js 26, keep skipping on Node.js 22 (#5961)
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.
1 parent 634c6fa commit d2c2ac2

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎test/http2-request-never-settles.js‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ const pem = require('@metcoder95/https-pem')
1111
const { Agent } = require('..')
1212

1313
const nodeMajor = Number(process.versions.node.split('.')[0])
14+
const nodeMinor = Number(process.versions.node.split('.')[1])
1415
const skipForMemoryCorruption =
1516
(process.platform === 'linux' && nodeMajor === 24) ||
1617
nodeMajor === 25
17-
const skipForOnreadAssertion = nodeMajor === 26
18+
// nodejs/node#64850 (onread->IsFunction() assertion during session teardown)
19+
// was fixed by nodejs/node#65116, which first shipped in Node.js v26.10.0.
20+
// The v22.x backport (nodejs/node#66515) has not been released yet, so add a
21+
// version gate here once a Node.js 22.x release carries the fix.
22+
const skipForOnreadAssertion =
23+
nodeMajor === 22 ||
24+
(nodeMajor === 26 && nodeMinor < 10)
1825

1926
// completeRequestStream() runs on an h2 stream's 'close':
2027
//
@@ -139,8 +146,9 @@ async function churningServer (rnd) {
139146

140147
for (const seed of SEEDS) {
141148
test(`every h2 request settles under connection churn (seed ${seed})`, {
142-
// https://github.com/nodejs/node/issues/64841
143-
// https://github.com/nodejs/node/issues/64850
149+
// https://github.com/nodejs/node/issues/64841 (still open, Node.js 24/25)
150+
// nodejs/node#64850 was fixed in Node.js v26.10.0; the v22.x backport is
151+
// still unreleased, so Node.js 22 and pre-fix 26.x keep skipping
144152
skip: (skipForMemoryCorruption || skipForOnreadAssertion) && 'Node.js has HTTP/2 session teardown crashes'
145153
}, async (t) => {
146154
const timer = setInterval(() => {}, 1000)

0 commit comments

Comments
 (0)