Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Dec 10, 2025

Summary

Adds a test suite that verifies the CLI correctly distributes concurrent HTTP requests across multiple workers. The tests send parallel requests to PHP scripts that respond with a HTTP header containing their process ID. Then the test confirms each request was handled by a different worker.

This catches regressions in the load balancer and worker spawning logic.

Test plan

  • CI passes on the test-playground-cli job
  • The new tests in multi-worker-requests.spec.ts run and pass

Adds a test suite that verifies the CLI correctly distributes concurrent
HTTP requests across multiple workers. The tests send parallel requests
to PHP scripts that return their process ID, then confirm each request
was handled by a different worker.

This catches regressions in the load balancer and worker spawning logic.
The CLI tests were failing on CI due to a race condition when multiple
test files try to download WordPress concurrently. When tests ran in
parallel, multiple processes competed for the same download file,
causing ENOENT errors when one process's partial file was overwritten
by another.

This adds fileParallelism: false to the vitest config to run test files
sequentially, avoiding the download race condition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants