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
test runner: concurrency boolean flag #43837
Comments
|
We should never use |
|
Actually, we need to spawn a process for each case ( describe('example', { concurrency: true } () => {
it('should add A and B', () => {
assert.strictEqual(arithmetic(1,2, 'add'), 3);
});
it('should subtract A from B', () => {
assert.strictEqual(arithmetic(1,3, 'subtract'), 2);
assert.strictEqual(arithmetic(3,1, 'subtract'), -2);
});
});Those 2 |
|
Concurrent |
|
Soooo, why is |
True, except if those |
|
Integer concurrency on the file level lets you control how many processes will be spawned, integer concurrency on the test level lets you limit how much work is done in parallel inside a single process |
I can certainly understand wanting to limit the number of process spawned, but why would anyone care to limit the number of cases within that process to a specific number? |
|
Say you have a large file with 2000 |
|
Ahh, okay. Seems a bit of an edge-case; I wouldn't expect an edge-case config option to be the default, but good to have supported. |
Given that it's not related to cpus, does it need to convert to a number? |
following up the discussion in #43757
if we want to allow the
concurrencyoption to be a boolean, we need to come up with good defaultsthere are two levels of concurrency:
--testeach file is spawned in its own process so we useos.cpus().lengthas the defaultfalseAssuming we want to allow passing
concurrency: truein a test file - what number would that convert to?The text was updated successfully, but these errors were encountered: