Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit d870b26

Browse files
authored
feat: allow setting maxWorkers (#73)
Fixes tests not using full capacity of machine running the tests. ```console bin/run-suite --maxWorkers=100 ```
1 parent f1bfaa2 commit d870b26

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ async function main() {
6565
type: 'boolean',
6666
requiresArg: false,
6767
})
68+
.options('maxWorkers', {
69+
alias: 'w',
70+
description: 'Specifies the maximum number of workers the worker-pool will spawn for running tests. We use a sensible default for running cli integ tests.',
71+
type: 'string',
72+
requiresArg: true,
73+
})
6874
.help()
6975
.showHelpOnFail(false)
7076
.argv;
@@ -126,6 +132,7 @@ async function main() {
126132
...args.runInBand ? ['-i'] : [],
127133
...args.test ? ['-t', args.test] : [],
128134
...args.verbose ? ['--verbose'] : [],
135+
...args.maxWorkers ? [`--maxWorkers=${args.maxWorkers}`] : [],
129136
...passWithNoTests ? ['--passWithNoTests'] : [],
130137
...args['test-file'] ? [args['test-file']] : [],
131138
], path.resolve(__dirname, '..', '..', 'resources', 'integ.jest.config.js'));

0 commit comments

Comments
 (0)