You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inline review comments on #806 from codeant-ai. Each addressed:
helpers/certs.ts:
- Switch from execSync with shelled-out openssl to execFileSync (argv array)
so paths containing spaces or shell metacharacters don't break cert gen.
helpers/testServer.ts:
- goawayAll now has a 1s fallback that destroys sessions if the peer doesn't
close promptly, so the promise can't hang indefinitely.
- startBlackholeServer.close returns Promise<void> so test teardown can await
actual shutdown completion.
session.test.ts:
- maxConcurrentStreams adoption tests poll for the expected state instead of
using a fixed 50ms sleep — non-flaky on slower CI.
- abort-listener tests use an instrumented AbortSignal that counts
addEventListener/removeEventListener calls, proving the listener is removed
on both success and mid-flight-abort paths. Added a second test for the
abort path.
regression.test.ts:
- R12 polls for _maxConcurrentStreams instead of sleeping.
integration.test.ts:
- 'concurrent origins' and 'AbortSignal' tests put fetch.close() in finally
so the H2 pool can't leak on assertion failure.
loadtest/h2load.sh:
- Run the server in its own process group via setsid; cleanup kills the
whole group so npx + node both die.
- Pass -k to h2load so the self-signed cert handshake doesn't fail.
loadtest/h2-multiplex.ts:
- Report both attemptedRps (N / wall) and effectiveRps (successful / wall)
so failures can't inflate the throughput number.
- Cert gen via execFileSync.
loadtest/h2-pool-growth.ts:
- Sample actual pool _sessions.length (drive via H2Pool directly since
createH2Fetch's per-origin map is closure-private), and assert
grow-on-ramp / no-shrink / bounded-by-maxConnections invariants.
loadtest/h2-chaos.ts:
- Validate durationSec > 0; guard against zero-denominator NaN in the
success-rate check.
- Cert gen via execFileSync.
loadtest/h2-leak.ts, h2-multiplex-server.ts:
- Cert gen via execFileSync.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments