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
{{ message }}
Repository navigation
No testTimeout is configured, so Windows inherits a POSIX-calibrated 5s default that measures contention
#4151
No testTimeout is configured anywhere, so every lane inherits vitest's 5s default. That number is POSIX-calibrated, and on Windows it measures contention rather than correctness.
Measured on a Windows runner: a full run failed 30 tests across 13 files, and every one of those files passed when run alone. Windows pays hundreds of milliseconds to start each process — Windows PowerShell 5.1 alone is expensive — and this suite runs many spawn-heavy files in parallel.
Raising the deadline to 30s left 2 failures; 60s left 3. Past roughly 30s there is no threshold to find, only residual flake that shuffles between runs — so 30s is the knee, and a larger value would only make a genuine hang cost more.
Fix
A per-platform deadline: 30s on Windows, vitest's 5s default retained on POSIX so CI keeps a fast failure signal, with an env override for host tuning. Applied in a fork at 411dfd772a.
One thing that bit us afterwards, worth knowing before adopting this
A raised default only reaches tests that do not override it. One describe-level { timeout: 15_000 } sat below the new Windows figure, so it did not raise that lane — it halved it, in a file whose tests drive real git and node processes and take ~4s each with the machine idle. It surfaced as a single timeout in a full run that CI had passed on the same commit.
If you take the per-platform deadline, grep for { timeout: at the same time. Every such literal is part of the change.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
No
testTimeoutis configured anywhere, so every lane inherits vitest's 5s default. That number is POSIX-calibrated, and on Windows it measures contention rather than correctness.Measured on a Windows runner: a full run failed 30 tests across 13 files, and every one of those files passed when run alone. Windows pays hundreds of milliseconds to start each process — Windows PowerShell 5.1 alone is expensive — and this suite runs many spawn-heavy files in parallel.
Raising the deadline to 30s left 2 failures; 60s left 3. Past roughly 30s there is no threshold to find, only residual flake that shuffles between runs — so 30s is the knee, and a larger value would only make a genuine hang cost more.
Fix
A per-platform deadline: 30s on Windows, vitest's 5s default retained on POSIX so CI keeps a fast failure signal, with an env override for host tuning. Applied in a fork at
411dfd772a.One thing that bit us afterwards, worth knowing before adopting this
A raised default only reaches tests that do not override it. One
describe-level{ timeout: 15_000 }sat below the new Windows figure, so it did not raise that lane — it halved it, in a file whose tests drive realgitandnodeprocesses and take ~4s each with the machine idle. It surfaced as a single timeout in a full run that CI had passed on the same commit.If you take the per-platform deadline, grep for
{ timeout:at the same time. Every such literal is part of the change.All reactions