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: get around port collisions with a random port #1418

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

haysclark
Copy link

closes #1326

  • port workaround allows more performant parallel testing
  • testing on CI environments should still utilize Jest’s —runInBand flag

- updating test folder to match setup of internal ‘plugin’ library
@netlify
Copy link

netlify bot commented Sep 16, 2020

Deploy request for graphql-nexus pending review.

Review with commit fac447d

https://app.netlify.com/sites/graphql-nexus/deploys

@haysclark
Copy link
Author

I opted to do a little code structuring in the 'testing' folder so that it matches the structure of the 'plugin' folder. If that isn't wanted, I can close this PR and make a new one with this simpler branch.

@haysclark
Copy link
Author

haysclark commented Sep 16, 2020

Windows tests are flaky, re-running via force-push. :(

@haysclark haysclark force-pushed the parrallel-testing branch 2 times, most recently from f059254 to 98b29cb Compare September 16, 2020 06:56
- during testing, get-port often re-uses the same port, due to the delay between when a free-port is assigned to a test, and when the port is actually used. Simply supplying an initial random port value to get-port dramatically reduces the chance of a port being used multiple times in a test run.
- testing on CI environments should still utilize Jest’s `—runInBand` flag
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.

CreateTestContext doesn't get assigned different ports when run in parrallel
1 participant