Skip to content

fix(test): extend timeout for ripgrep tests that download the rg binary (LAC-2693)#34

Closed
lacymorrow wants to merge 1 commit into
LAC-2386/fix-shell-cwd-testsfrom
LAC-2693/fix-windows-ripgrep-test-timeouts
Closed

fix(test): extend timeout for ripgrep tests that download the rg binary (LAC-2693)#34
lacymorrow wants to merge 1 commit into
LAC-2386/fix-shell-cwd-testsfrom
LAC-2693/fix-windows-ripgrep-test-timeouts

Conversation

@lacymorrow

Copy link
Copy Markdown
Owner

Summary

Fixes the last remaining unit (windows) failures for LAC-2693 (sibling of LAC-2386/linux).

Stacked on #33 (which is stacked on #28). The LAC-2386 fixture/InstanceRef fixes already cleared 108 of the original 112 windows failures — the latest unit (windows) run on #33 (job 86154739532) shows only 4 failures + 2 errors remaining, all in the Ripgrep suites.

Root cause

On Windows, the first Ripgrep.Service use downloads the rg release zip and extracts it via PowerShell Expand-Archive (packages/core/src/ripgrep/binary.ts). That takes longer than bun's default 5s per-test timeout, so the test SIGTERMs the extraction mid-flight (error: Unknown: ChildProcess.exitCode (...powershell.exe ... Expand-Archive ...)), nothing gets cached, and every ripgrep test repeats the slow path:

  • packages/core/test/ripgrep.test.ts — 2 tests
  • packages/core/test/filesystem/search.test.ts — 2 tests

Fix

Give those 4 tests an explicit 120s timeout. Only the first one pays the download cost; it caches rg.exe in Global.Path.bin, so subsequent tests short-circuit and stay fast. No behavior change on machines with rg on PATH (macOS/Linux dev machines: all 4 tests ran in 481ms locally).

Acceptance criteria (LAC-2693)

  • unit (windows) job reaches success — verify on this PR's CI run
  • No skipped-en-masse tests — real fix, no skips

Testing

  • bun test test/ripgrep.test.ts test/filesystem/search.test.ts in packages/core: 4 pass, 0 fail (macOS)
  • Windows verification via this PR's unit (windows) job

…ry (LAC-2693)

On Windows CI runners the first Ripgrep.Service use downloads the rg
release zip and extracts it via PowerShell Expand-Archive, which exceeds
bun's default 5s per-test timeout. The test SIGTERMs the extraction
mid-flight, nothing is cached, and all four ripgrep tests repeat the
slow path and fail. Give those tests a 120s timeout so the one-time
download completes; later tests find the cached binary and stay fast.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request increases the test timeout to 120 seconds for Ripgrep-related tests in search.test.ts and ripgrep.test.ts. This prevents test failures on Windows CI runners where downloading and extracting the rg binary during the first run can exceed the default 5-second timeout. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@lacymorrow

Copy link
Copy Markdown
Owner Author

This PR was auto-closed when its stacked base branch (#33) merged and was deleted; GitHub does not allow retargeting a closed PR. Superseded by #35, which carries the same commit rebased onto LAC-2385/blacksmith-to-github-runners (#28's branch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant