Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityvi committed Oct 19, 2023
1 parent 2bbcc9b commit 74e5ad4
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/src/cli/testParallelExecution.js
Expand Up @@ -12,6 +12,7 @@ describe('test Parallel Execution', function() {
const allOpts = [];

this.timeout(10000);
let workerCount;

beforeEach(function() {
mockery.enable({useCleanCache: true, warnOnUnregistered: false});
Expand Down Expand Up @@ -48,7 +49,7 @@ describe('test Parallel Execution', function() {

this.tasks = [];
this.index = 0;

workerCount = maxWorkerCount;
workerPoolArgv.push(args);
}

Expand Down Expand Up @@ -628,4 +629,20 @@ describe('test Parallel Execution', function() {
assert.equal(client2.transport.settings.webdriver.port, 9999);
});

it('test number of work threads for parallel execution', function() {

const CliRunner = common.require('runner/cli/cli.js');
const runner = new CliRunner({
reporter: 'junit',
config: path.join(__dirname, '../../extra/parallelism-count.json'),
env: 'default',
headless: true
});

runner.setup({});

return runner.runTests().then(_ => {
assert.strictEqual(workerCount, 4);
});
});
});

0 comments on commit 74e5ad4

Please sign in to comment.