Skip to content

fix(e2e): run server tests sequentially - #230

Closed
SulimanAbdulrazzaq wants to merge 1 commit into
co-l:developfrom
SulimanAbdulrazzaq:fix/e2e-local-concurrency
Closed

fix(e2e): run server tests sequentially#230
SulimanAbdulrazzaq wants to merge 1 commit into
co-l:developfrom
SulimanAbdulrazzaq:fix/e2e-local-concurrency

Conversation

@SulimanAbdulrazzaq

Copy link
Copy Markdown
Contributor

Summary

Closes #225.

Each E2E test file starts a full OpenFox server. Starting up to 12 of these servers concurrently can exhaust local CPU and memory long enough for createTestServer() to exceed the existing 10-second hook timeout.

Run server-backed E2E files sequentially, matching the already reliable CI worker policy. This addresses the resource contention directly without increasing test or hook timeouts.

A regression assertion now protects the worker policy.

Validation:

  • Reproduced the default-worker startup timeout cascade
  • Confirmed four workers still fail with the same hook timeouts
  • e2e/timeouts.test.ts: 4 tests passed
  • E2E TypeScript check passed
  • Prettier passed for both changed files
  • Full sequential E2E run was capped after approximately eight minutes under concurrent batch load and did not produce a final result

AI-Enhanced Development

  • AI Models: GPT-5.6 (Codex)

Cache Impact

  • No

Parallel full-server startups exceed the existing hook budget on supported developer machines.

Closes co-l#225
@co-l

co-l commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Thanks for digging into this — the diagnosis (parallel full-server startups blowing the hook budget) is spot on.

We went with a gentler fix on develop instead of forcing sequential for everyone: the worker count is now configurable per machine via an env var, with the old defaults preserved.

  • Default: 12 workers locally, 1 on CI (unchanged).
  • Override per machine: OPENFOX_E2E_MAX_WORKERS=<n>
    • e.g. OPENFOX_E2E_MAX_WORKERS=4 npm run test:e2e
  • Invalid values (non-integer, <1, garbage) fall back to the default.

The concern with merging this PR as-is was that hardcoding maxWorkers: 1 — plus the new regression test asserting it — would permanently remove the ability to parallelize for everyone, including machines that handle 12 fine. This way the knob stays.

Closing this one; if your machine still can't cope with the env var set low, reopen and we can look at a smarter default (e.g. derived from CPU count).

@co-l co-l closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants