From 1c025bdd60c0e484efa94c647a294fee88cd9e09 Mon Sep 17 00:00:00 2001 From: Lacy Morrow Date: Thu, 9 Jul 2026 14:53:51 -0400 Subject: [PATCH] fix(test): extend timeout for ripgrep tests that download the rg binary (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. --- packages/core/test/filesystem/search.test.ts | 6 ++++++ packages/core/test/ripgrep.test.ts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/core/test/filesystem/search.test.ts b/packages/core/test/filesystem/search.test.ts index 6c47c85e9635..f74bbb6f1889 100644 --- a/packages/core/test/filesystem/search.test.ts +++ b/packages/core/test/filesystem/search.test.ts @@ -10,6 +10,10 @@ import { testEffect } from "../lib/effect" const it = testEffect(LayerNode.compile(Ripgrep.node)) +// first Ripgrep use may download and extract the rg binary, which exceeds the +// default 5s test timeout on Windows CI runners (PowerShell Expand-Archive) +const RG_DOWNLOAD = { timeout: 120_000 } + const withTmp = (f: (directory: AbsolutePath) => Effect.Effect) => Effect.acquireRelease( Effect.promise(() => tmpdir()), @@ -26,6 +30,7 @@ describe("Ripgrep", () => { expect(result.map((item) => item.path)).toEqual([RelativePath.make("src/match.ts")]) }), ), + RG_DOWNLOAD, ) it.live("greps files with include filtering", () => @@ -40,5 +45,6 @@ describe("Ripgrep", () => { expect(result[0]?.submatches[0]?.text).toBe("needle") }), ), + RG_DOWNLOAD, ) }) diff --git a/packages/core/test/ripgrep.test.ts b/packages/core/test/ripgrep.test.ts index 3abce1c02d6d..4704546a61fc 100644 --- a/packages/core/test/ripgrep.test.ts +++ b/packages/core/test/ripgrep.test.ts @@ -10,6 +10,10 @@ import { testEffect } from "./lib/effect" const it = testEffect(LayerNode.compile(Ripgrep.node)) +// first Ripgrep use may download and extract the rg binary, which exceeds the +// default 5s test timeout on Windows CI runners (PowerShell Expand-Archive) +const RG_DOWNLOAD = { timeout: 120_000 } + describe("Ripgrep", () => { it.live("keeps ignored files out of catch-all find results", () => Effect.acquireUseRelease( @@ -29,6 +33,7 @@ describe("Ripgrep", () => { }), (tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]()), ), + RG_DOWNLOAD, ) it.live("never includes git metadata", () => @@ -61,5 +66,6 @@ describe("Ripgrep", () => { }), (tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]()), ), + RG_DOWNLOAD, ) })