diff --git a/tools/@aws-cdk/cdk-build-tools/config/jest.config.js b/tools/@aws-cdk/cdk-build-tools/config/jest.config.js index 9a93f61e642ba..80e8f52f53b2c 100644 --- a/tools/@aws-cdk/cdk-build-tools/config/jest.config.js +++ b/tools/@aws-cdk/cdk-build-tools/config/jest.config.js @@ -22,11 +22,8 @@ module.exports = { }, ], }, - - // Limit workers to a reasonable fixed number. If we scale in the number of available CPUs, we will explode - // our memory limit on the CodeBuild instance that has 72 CPUs. - maxWorkers: Math.min(8, cpus().length - 1), - + // Jest is resource greedy so this shouldn't be more than 50% + maxWorkers: '50%', testEnvironment: 'node', coverageThreshold: { global: {