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

Enables parallel test runs #673

Merged
merged 1 commit into from
Apr 2, 2021
Merged

Enables parallel test runs #673

merged 1 commit into from
Apr 2, 2021

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Apr 1, 2021

Changes

  • Removes --runInBand flag from unit and integration test commands.
  • Removes the --max_old_space_size=8000 cap on the integration tests (previously added due to spawning WDS on each test and ts compiler causing a memory heap).

Motivation

Current CI takes a lot of time to run, decreasing the iteration speed for the changes. Integration tests alone take about 6m 30s to run, not taking the workspace attachment into account (ref).

History

The --runInBand flag was added to prevent some leaking state between tests. It might have been related to the old testing setup that we don't have anymore, or to #474. I didn't see any problems running parallel tests locally.

Benchmarks

  • Before
  • After (see CI for the latest commit)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 1, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 46a529e:

Sandbox Source
MSW React Configuration

@kettanaito
Copy link
Member Author

CI fails spectacularly, reaching out of memory state, and taking a tremendous amount of time to run.

@fnmunhoz
Copy link
Contributor

fnmunhoz commented Apr 1, 2021

Hey @kettanaito I have experienced this problem before and I'm almost sure it's related to that:

https://discuss.circleci.com/t/memory-problems-with-jest-and-workers/10297/4

The CircleCI job exposes all the VM CPUs to Jest, but it actually can only use 2 in this case, which is the number of available CPUs to the job (via docker).

I would suggest playing with this option, starting with 2: --maxWorkers=2.

Jest recommends one worker per CPU core, minus 1 for the main thread, but it might be possible to spawn more in CircleCI, until the tests run consistently.

Hope it helps :)

@msutkowski
Copy link
Member

Yup, circleci isn't very friendly with Jest depending on the instance size. We might want to consider switching CI to github actions for fun :)

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.

3 participants