Skip to content

Commit 5ec3ec9

Browse files
chore: only use 50% of workers for jest (#30393)
Jest is resource greedy so using all but one cores is actually slowing down the tests ### Issue # (if applicable) Closes #<issue number here>. ### Reason for this change ### Description of changes ### Description of how you validated changes ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 81a558f commit 5ec3ec9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tools/@aws-cdk/cdk-build-tools/config/jest.config.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ module.exports = {
2222
},
2323
],
2424
},
25-
26-
// Limit workers to a reasonable fixed number. If we scale in the number of available CPUs, we will explode
27-
// our memory limit on the CodeBuild instance that has 72 CPUs.
28-
maxWorkers: Math.min(8, cpus().length - 1),
29-
25+
// Jest is resource greedy so this shouldn't be more than 50%
26+
maxWorkers: '50%',
3027
testEnvironment: 'node',
3128
coverageThreshold: {
3229
global: {

0 commit comments

Comments
 (0)