Skip to content

Commit dd671bc

Browse files
committed
fix(tests): drop detect timeout-stub sleep from 5s to 2s
The "op hangs past timeoutMs" test was intermittently hitting vitest's 5000ms default testTimeout on CI. `_spawn.ts` waits for `child.on("close")`, which only fires once the grandchild sleep exits — SIGKILL on the shell wrapper doesn't cascade, so `sleep 5` kept the pipes open the full 5s. Matches the keychain test's pattern (sleep 2 + timeoutMs: 100). Local full run: 239/240 still green.
1 parent febabae commit dd671bc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/secrets/backends/detect.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ exit 2
105105
});
106106

107107
it("returns unavailable/other with detail 'timeout' when op hangs past timeoutMs", async () => {
108-
const opPath = await makeOpStub(`sleep 5`);
108+
// sleep 2 (not 5) — _spawn.ts waits for `close` which only fires once the
109+
// sleep child exits; under vitest's 5s default testTimeout, `sleep 5` is
110+
// right on the edge and CI's Linux scheduler pushes it over.
111+
const opPath = await makeOpStub(`sleep 2`);
109112
const result = await _detectBackendsWithOverrides({
110113
opPath,
111114
platform: "darwin",

0 commit comments

Comments
 (0)