From 3009a2fcaf1b4d0ad0de2930c967ff27e43154b0 Mon Sep 17 00:00:00 2001 From: Suliman Abdulrazzaq Date: Sat, 8 Aug 2026 21:23:27 +0300 Subject: [PATCH] fix(e2e): run server tests sequentially Parallel full-server startups exceed the existing hook budget on supported developer machines. Closes #225 --- e2e/timeouts.test.ts | 4 ++++ e2e/vitest.config.ts | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) 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