0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/e2e/solid-router
Nico Lynzaad 3854370bdf
fix: assign random ports for e2e tests (#4676)
This is a follow on from #4653

This PR resolves flaky E2E tests caused by port collisions when running
tests in parallel.

Instead of deriving ports from package names (which can collide), this
new approach assigns a random, available port to each test server
instance.

Key Changes:

- Random Port Allocation: Each test server (Playwright, dummy servers)
gets a unique, random port at startup.
- File-based Sync: The server writes its assigned port to a port.txt
file in its test project directory, this is kept unique through using
the package name or another input string for the file name.
- Test Runner Sync: The test runner reads the port from that file to
build the correct URL.
- Automatic Cleanup: All port files are deleted at the start of each
test:e2e run to ensure fresh ports.

Local parallel runs (up to 10) have shown this to be stable and free of
collisions.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
History 2025-07-17 07:24:59 +02:00
..
basic fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
basic-esbuild-file-based fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
basic-file-based fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
basic-file-based-code-splitting fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
basic-scroll-restoration fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
basic-solid-query fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
basic-solid-query-file-based fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
basic-virtual-file-based fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
basic-virtual-named-export-config-file-based fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
rspack-basic-file-based fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
rspack-basic-virtual-named-export-config-file-based fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00
scroll-restoration-sandbox-vite fix: assign random ports for e2e tests (#4676) 2025-07-17 07:24:59 +02:00