-
Notifications
You must be signed in to change notification settings - Fork 30k
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
cc @nodejs/test_runner @lpinca @JakobJingleheimer |
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? |
I guess unlimited is ok for test level, since a specific limit can be provided with a number. Please 👍 if this makes sense: File level concurrency
Test level concurrency
|
@MoLow I'm interested in taking up this issue. Can this issue be assigned to me please? |
@98lenvi please do! |
adds the test_concurrency flag, if set to true, runs all the tests in parallel Fixes: nodejs#43837
adds the test_concurrency flag, if set to true, runs all the tests in parallel Fixes: nodejs#43837
adds the test_concurrency flag, if set to true, runs all the tests in parallel Fixes: nodejs#43837
adds the test_concurrency flag, if set to true, runs all the tests in parallel Fixes: nodejs#43837
adds the test_concurrency flag, if set to true, runs all the tests in parallel Fixes: nodejs#43837
adds the test_concurrency flag, if set to true, runs all the tests in parallel Fixes: nodejs#43837
adds the test_concurrency flag, if set to true, runs all the tests in parallel Fixes: nodejs#43837
PR-URL: #43887 Fixes: #43837 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
PR-URL: nodejs/node#43887 Fixes: nodejs/node#43837 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]> (cherry picked from commit dab492f0444b0a6ae8a41dd1d9605e036c363655)
PR-URL: nodejs/node#43887 Fixes: nodejs/node#43837 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]> (cherry picked from commit dab492f0444b0a6ae8a41dd1d9605e036c363655)
PR-URL: #43887 Fixes: #43837 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
PR-URL: #43887 Fixes: #43837 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
PR-URL: #43887 Fixes: #43837 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
PR-URL: nodejs#43887 Fixes: nodejs#43837 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
PR-URL: nodejs/node#43887 Fixes: nodejs/node#43837 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
following up the discussion in #43757
if we want to allow the
concurrency
option to be a boolean, we need to come up with good defaultsthere are two levels of concurrency:
--test
each file is spawned in its own process so we useos.cpus().length
as the defaultfalse
Assuming we want to allow passing
concurrency: true
in a test file - what number would that convert to?The text was updated successfully, but these errors were encountered: