Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions test/http2-request-never-settles.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

Check failure on line 1 in test/http2-request-never-settles.js

View workflow job for this annotation

GitHub Actions / Test with Node.js 25 on ubuntu-latest with WASM SIMD disabled / Test with Node.js 25 on ubuntu-latest

/home/runner/work/undici/undici/test/http2-request-never-settles.js

'test failed'

const assert = require('node:assert')
const { test, after } = require('node:test')
const { test } = require('node:test')
const { constants, createSecureServer } = require('node:http2')
const { once } = require('node:events')
const { Readable } = require('node:stream')
Expand All @@ -10,6 +10,8 @@

const { Agent } = require('..')

const skipOnNode24 = Number(process.versions.node.split('.')[0]) === 24

// completeRequestStream() runs on an h2 stream's 'close':
//
// releaseRequestStream(this)
Expand Down Expand Up @@ -115,7 +117,9 @@
}

for (const seed of SEEDS) {
test(`every h2 request settles under connection churn (seed ${seed})`, async () => {
test(`every h2 request settles under connection churn (seed ${seed})`, {
skip: skipOnNode24 && 'Node.js 24 has an HTTP/2 memory corruption bug'
}, async (t) => {
const timer = setInterval(() => {}, 1000)
const rnd = makeRandom(seed)
const server = await churningServer(rnd)
Expand All @@ -127,10 +131,16 @@
headersTimeout: 500,
bodyTimeout: 500
})
after(async () => {
await agent.destroy()
server.shutdown()
clearInterval(timer)
// Release each seed's resources before the next test starts. A file-level
// after hook kept every TLS server and keepalive timer until all seeds had
// finished, making this churn test sensitive to CI load.
t.after(async () => {
try {
await agent.destroy()
} finally {
server.shutdown()
clearInterval(timer)
}
})

const unsettled = []
Expand Down
Loading