mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
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>
29 lines
1,001 B
29 lines
1,001 B