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

Automatically determine better value for --maxWorkers for Travis CI #3765

Closed
nodkz opened this issue Jun 8, 2017 · 2 comments
Closed

Automatically determine better value for --maxWorkers for Travis CI #3765

nodkz opened this issue Jun 8, 2017 · 2 comments

Comments

@nodkz
Copy link
Contributor

nodkz commented Jun 8, 2017

Do you want to request a feature or report a bug?
feature

What is the current behavior?
Jest spawns unknown huge amount of workers on Travis CI. And if you make tests for several node versions it multiplies by its number. If you use DB or something other resources it may bring race conditions and fail tests.

After tuning Travis CI config all starts working like a charm. It very simple to tune, but it was a huge pain to determine the problem and find a solution.

# .travis.yml

script:
-  - yarn run coverage
+  - yarn run coverage -- --maxWorkers 4

Also maybe used unrecommended --runInBand.

What is the expected behavior?
Painless testing for all. 😊

Last success test with --maxWorkers 4 option. Two days of pain 😅
https://travis-ci.org/nodkz/graphql-compose-mongoose/builds
screen shot 2017-06-08 at 17 11 31

@thymikee
Copy link
Collaborator

thymikee commented Jun 8, 2017

We generally advice running jest on Ci without spawning extra workers using jest --runInBand to avoid such problems.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants