Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(e2e): Use VITEST_WORKER_ID to generate test server ports #3248

Closed

Conversation

toBeOfUse
Copy link
Contributor

@toBeOfUse toBeOfUse commented Nov 30, 2024

Description

Closes #3247. Instead of using unsynchronized access to a temporary file to determine the next available port, it uses the VITEST_WORKER_ID environment variable, which should be unique in each test suite, to figure out what port it should be using.

Breaking changes

Nope, it only applies to the internal test configuration used in Vendure's e2e self-tests.

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Copy link

vercel bot commented Nov 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Nov 30, 2024 8:46am

@toBeOfUse
Copy link
Contributor Author

Well, this failed miserably. Apparently learn runs the asset server e2e tests, the elasticsearch plugin e2e tests, and the payments plugin e2e tests in parallel, in separate vitest processes. In a normal repository, the VITEST_WORKER_ID approach works; however, in a monorepo where multiple vitest instances are started in parallel, it does not.

@toBeOfUse toBeOfUse closed this Nov 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Occasional Port Conflicts in CI tests
1 participant