Repository navigation
test(filesystem): explicit timeout on the 100000-entry walk tests - #5331
Conversation
The bounded-walk cap tests walk MAX_WALK_ENTRIES + 1 mocked entries on purpose, so their cost scales with the runner. On a loaded Windows runner the search_files one crossed vitest's 5 s default and turned v2/main red. Give the three cap tests a 30 s timeout, with the reason beside it; no retry, and the real bound is still the one tested. Fixes #5328. Approach also proposed by FelixFangX in that issue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the test-timeout-only change.
No open issues 🎉
What changed in this PR
This tests-only change addresses #5328 by giving the filesystem server’s large bounded-walk tests more time on slow Windows runners, without changing server behavior.
Changes:
- Applies a shared 30-second timeout to three tests processing 100,001 mocked entries.
- Documents the timeout rationale while preserving the real entry cap and avoiding retries.
| File | Description |
|---|---|
src/filesystem/__tests__/bounded-walk.test.ts |
Adds explicit timeouts and explanatory comments for the three large-walk tests. |
Review effort: Balanced
|
Copilot round 1: clean (no findings). Loop stopped on the first clean round. |
Closes #5328
Description
The three
bounded-walk.test.tstests that walkMAX_WALK_ENTRIES + 1(100,001) mocked entries now carry an explicit 30 s timeout (it(name, { timeout }, fn)), with a comment saying why. Their cost is the bound they check, so it scales with the runner: about 1 s on a Mac, near vitest's 5 s default on a loaded Windows runner. No retry (AGENTS.md forbids them) and the cap is unchanged, so the tests still exercise the real bound.git diff -wis +20/−5: the rest is Prettier re-indenting the two tests whose long titles push the options argument onto its own line.Server Details
src/filesystem/__tests__/bounded-walk.test.ts)Motivation and Context
Test filesystem (Windows)failed onv2/mainat d1b59ba (search_files› "stops with an error after visiting 100000 entries": 5.96 s,Test timed out in 5000ms). That same failure is the redTypeScript (dispatched)status on the Version Packages PR #5296, so it blocks the v2.2.0 release (#5330).Credit: @FelixFangX proposed the same fix in #5328.
How Has This Been Tested?
No client-observable surface (tests only), so a targeted probe:
500ms, thesearch_filescap test fails withTest timed out in 500ms(it takes ~1050 ms locally). This confirms the per-test option, not the 5 s default, is the one in force. At30_000:Tests 10 passed (10).npm run local:gate: exit 0.Breaking Changes
None.
Types of changes
Checklist
🤖 Generated with Claude Code