-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: integration test in circle ci #5780
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: integration test in circle ci #5780
Conversation
e7b5792 to
0e73355
Compare
9f277cd to
a8e0770
Compare
* set jest integration test maxWorker flag to 1 * set max node memory consumption for CI container to 4000MB Signed-off-by: Gary Ryan Vaz <[email protected]>
a8e0770 to
cc589fc
Compare
machikoyasuda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
|
@rosshadden What do you think? I ran it locally on OS X and my stats were: But it's much faster in CI. How about your machine? |
@machikoyasuda one of the main reasons this happens is due to the specification of the host CPU of the docker container. For eg, you would be running the tests on macbook pro which may have an i5 or i7 mobile processor while the CI instance has a XEON server processor, which has a massive difference in single core performance. This is important as we are using --runInBand which uses a single core of the CPU. Test results on my machine take: My laptop has the intel i7 9750H mobile processor. |
rosshadden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My environment seems to be a bit messed up, as even with no changes from HEAD and newly installed node modules neither way successfully finishes. I believe it would be ideal to run with --maxWorkers locally and --runInBand in CI, like that one article says that you linked the other day @machikoyasuda.
|
@rosshadden with |
|
I've been out, but to add a little context: The I'm not sure if any automatic data destruction happens between tests. I don't think any tests are creating many documents without removing them after, but that could be one thing to check, especially if it keeps some of the mongo data in memory. So this PR looks fine to me FYI @spencern |
Resolves #5779
Impact: minor
Type: performance|test
Issue
maxWorkers for jest integration test was set to 3 which increased the CPU and RAM consumption of CI container
Solution
bring back --runInBand and reduce node memory limit for jest integration script to 4000 MB so that there some memory for other processes.
Refer:
Note: Although in the reference, global.gc is invoked before each test, it wasn't required here.
Breaking changes
none