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 · 1 comment

Comments

Projects
None yet
2 participants
@nodkz
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

This comment has been minimized.

Show comment
Hide comment
@thymikee

thymikee Jun 8, 2017

Collaborator

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

Collaborator

thymikee commented Jun 8, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment