fix(test): release Windows search handles

This commit is contained in:
Kit Langton 2026-06-06 21:03:39 -04:00
parent ac07fe16a0
commit 3d03b49a11
2 changed files with 6 additions and 3 deletions

View file

@ -262,9 +262,9 @@ export const layer: Layer.Layer<Service, never, FSUtil.Service | Ripgrep.Service
basePath: dir,
frecencyDbPath: path.join(root, `${id}.frecency.mdb`),
historyDbPath: path.join(root, `${id}.history.mdb`),
// fff uses a bit different log version, also with spans so keep
// them in the same folder for debuggability
logFilePath: path.join(Global.Path.log, "fff.log"),
// fff 0.9.3 keeps its process-global log file open until exit, so
// disable it in tests to let Windows remove the isolated XDG tree.
logFilePath: process.env.NODE_ENV === "test" ? undefined : path.join(Global.Path.log, "fff.log"),
logLevel: Log.getLevel().toLowerCase() as Lowercase<Log.Level>,
aiMode: true,
// only the first toolcall picker can accumulate resources to index

View file

@ -10,6 +10,9 @@ import { afterAll } from "bun:test"
const dir = path.join(os.tmpdir(), "opencode-test-data-" + process.pid)
await fs.mkdir(dir, { recursive: true })
afterAll(async () => {
const { AppRuntime } = await import("../src/effect/app-runtime")
await AppRuntime.dispose()
const busy = (error: unknown) =>
typeof error === "object" && error !== null && "code" in error && error.code === "EBUSY"
const rm = async (left: number): Promise<void> => {