-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix parallel feature: disable parallel automatically/ add command line option #4428
Conversation
I'm working on failed test cases! |
3118f81
to
0eb8e83
Compare
I am still working on test cases and PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
In general, I agree with this--Mocha should not run in parallel if there is only a single file, and we need a way to force it to run in parallel. This will affect many of our tests, as you have probably discovered. A way to address this is to detect --parallel
in the arguments (see test/integration/helpers.js
) and append --force-parallel
to it. I would prefer the option is called --force-parallel
, not --parallel-force
.
I am unsure if this would be a breaking change. Ideally, it would not have any impact on consumers, but... you never know. |
Please mark this PR as "ready" when the tests are passing |
I also don't think many customers would run a single file in parallel option. And I will do mark PR when test passed. |
right, consumers may not, but Mocha needs to do so in order to efficiently test parallel mode. so this is why I'd want |
👋 coming back to this @stoicchild8910, are you still interested in working on this PR? As of #5027 there are again maintainers who can review it now. No worries if you no longer have time - but if you do that'd be great! |
Requirements
Description of the Change
This PR comes from the idea #4322
AS-IS
[single run]
[parallel run]
(1) fix parallel feature : When running a single file, disable parallel mode automatically.
If we run only a single file in parallel mode, it is much slower.
So I added a feature to automate swap from parallel mode to single mode when we're running a single file.
(2) Added Command Line Option: added an option to FORCE PARALLEL MODE in (1) situation
Alternate Designs
Why should this be in core?
Benefits
When running a single file, Mocha automatically run in a faster way.
Possible Drawbacks
There must be a way to force parallel mode when running a single file if needed.
Applicable issues