Repository navigation
fix(ci): pin unit test fork pool + retry to kill intermittent timeouts - #2746
Merged
Merged
Conversation
The unit vitest project ran with vitest's default unbounded fan-out (one
worker per CPU) across ~400 cds.test('serve') files, each booting a CAP
server. On CI this intermittently starved a file's cold boot past the 30s
testTimeout, surfacing as flaky 30s timeouts (e.g. /admin/$metadata in
admin-schema-ext.test.js) that pass 3/3 in isolation. The smoke/e2e/
hybrid-qa tiers already pin pool:'forks' + maxWorkers + retry against this
exact unbounded-fan-out saturation; the unit tier never got the caps.
Add to the unit project:
- pool: 'forks'
- maxWorkers: 4 on CI (unbounded locally)
- retry: 1 on CI (absorbs a lone transient boot blip; a deterministic
failure still fails both tries, so this masks nothing real)
Verified: admin-schema-ext.test.js + scan-markdown-source.test.ts pass
20/20 under CI=true with the new pool settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
unitvitest project runs with vitest's default unbounded fan-out (one worker per CPU) across ~400cds.test('serve')files, each booting a CAP server. On CI runners this occasionally starves one file's cold boot past the 30stestTimeout, producing flaky failures that aren't code bugs:test/admin-schema-ext.test.js— 3× 30s timeouts on/admin/$metadata(PR run 38392511887). Passes 3/3 in ~16s in isolation.smoke,e2e, andhybrid-qatiers already pinpool: 'forks'+maxWorkers+retry. Theunittier never got the caps.(The parser assertion failures seen on earlier DEV merges #2739/#2740 were separate, Node-22/merge-ref inherited, and already self-cleared on current DEV — not addressed here.)
Fix
Add to the
unitproject invitest.config.ts:retry: 1is the single lever that would have turned every recent intermittent red green. It masks nothing real — a deterministic failure fails both tries.Verification
admin-schema-ext.test.js+scan-markdown-source.test.ts→ 20/20 pass underCI=truewith the new pool settings active.Mirrors the documented #1177/#1179 fork-pool-race mitigations already in this config.
🤖 Generated with Claude Code