test: pin backend stall timeout boundary

This commit is contained in:
Palash Debnath
2026-09-02 01:29:22 +05:30
parent 5e08dde5e0
commit 6e47b15e82
@@ -123,9 +123,17 @@ describe('useBootstrapStage — awaiting_setup is human-gated (#1376)', () => {
expect(result.current.stage).toBe('starting_backend');
expect(result.current.message ?? '').not.toMatch(/stuck/i);
// Pin both sides of the six-minute fallback boundary.
await act(async () => {
await vi.advanceTimersByTimeAsync(3 * 60 * 1000 - 1_000);
});
expect(result.current.stage).toBe('starting_backend');
expect(result.current.message ?? '').not.toMatch(/stuck/i);
// A frontend-only deadlock remains bounded if the shell never advances.
await act(async () => {
await vi.advanceTimersByTimeAsync(4 * 60 * 1000);
await vi.advanceTimersByTimeAsync(2_000);
});
expect(result.current.stage).toBe('failed');