diff --git a/e2e/timeouts.test.ts b/e2e/timeouts.test.ts index 4c48f08b..cf9ecb27 100644 --- a/e2e/timeouts.test.ts +++ b/e2e/timeouts.test.ts @@ -11,6 +11,10 @@ describe('E2E timeouts', () => { expect(config.test?.testTimeout).toBe(15_000 * CI_MULTIPLIER) }) + it('runs server-backed test files sequentially', () => { + expect(config.test?.maxWorkers).toBe(1) + }) + it('keeps websocket waits within the per-test budget', () => { const budget = 8_000 * CI_MULTIPLIER expect(DEFAULT_WAIT_TIMEOUT_MS).toBeLessThanOrEqual(budget) diff --git a/e2e/vitest.config.ts b/e2e/vitest.config.ts index 7f8581ce..52ccb73a 100644 --- a/e2e/vitest.config.ts +++ b/e2e/vitest.config.ts @@ -14,10 +14,10 @@ export default defineConfig({ testTimeout: 15_000 * CI_MULTIPLIER, hookTimeout: 10_000 * CI_MULTIPLIER, - // Run tests in parallel with fork pool - // Each test file gets its own in-process server on a dynamic port + // Each test file starts a full server. Parallel startups contend for enough + // CPU and memory to exceed the hook timeout on supported developer machines. pool: 'forks', - maxWorkers: process.env['CI'] === 'true' ? 1 : 12, // CI runners are resource-constrained + maxWorkers: 1, // No global setup - each test file manages its own server // globalSetup: './setup.ts', // REMOVED - using in-process servers