Skip to content

Commit 80adc35

Browse files
committed
test: relax zombie guard timing assertions for CI jitter
Increase upper-bound timing tolerances in zombie process tests to reduce flaky failures on slower runners while keeping the timeout-behavior contract intact.
1 parent 54d232f commit 80adc35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/zombie-guard.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('zombie process prevention', () => {
7474
expect(result.stderr).toContain('No MCP client connected within');
7575
expect(result.stderr).toContain('npx codebase-context --help');
7676
// Should exit roughly around the timeout (2s), not hang forever
77-
expect(result.elapsed).toBeLessThan(10_000);
77+
expect(result.elapsed).toBeLessThan(12_000);
7878
}, 15_000);
7979

8080
it('exits with code 1 even when invoked with no arguments at all', async () => {
@@ -85,7 +85,7 @@ describe('zombie process prevention', () => {
8585

8686
expect(result.code).toBe(1);
8787
expect(result.stderr).toContain('No MCP client connected within');
88-
expect(result.elapsed).toBeLessThan(10_000);
88+
expect(result.elapsed).toBeLessThan(12_000);
8989
}, 15_000);
9090

9191
it('does not start indexing or file watchers before handshake', async () => {
@@ -115,8 +115,8 @@ describe('zombie process prevention', () => {
115115
const elapsed = Date.now() - start;
116116

117117
expect(result.code).toBe(1);
118-
// Should exit around 1 second, definitely under 5
118+
// Should still honor a short timeout (allow CI/Windows process jitter).
119119
expect(elapsed).toBeGreaterThan(800);
120-
expect(elapsed).toBeLessThan(5_000);
120+
expect(elapsed).toBeLessThan(7_000);
121121
}, 10_000);
122122
});

0 commit comments

Comments
 (0)