-
Notifications
You must be signed in to change notification settings - Fork 853
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
Action for running tests in parallel #7979
base: master
Are you sure you want to change the base?
Action for running tests in parallel #7979
Conversation
extide/gradle/src/org/netbeans/modules/gradle/ActionProviderImpl.java
Outdated
Show resolved
Hide resolved
ide/extexecution.base/src/org/netbeans/api/extexecution/base/ExplicitProcessParameters.java
Outdated
Show resolved
Hide resolved
...a.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java
Outdated
Show resolved
Hide resolved
java/gradle.test/src/org/netbeans/modules/gradle/test/GradleTestProgressListener.java
Show resolved
Hide resolved
java/gradle.test/src/org/netbeans/modules/gradle/test/GradleTestProgressListener.java
Show resolved
Hide resolved
java/maven/src/org/netbeans/modules/maven/execute/AbstractOutputHandler.java
Show resolved
Hide resolved
java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java
Outdated
Show resolved
Hide resolved
java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineOptions.java
Outdated
Show resolved
Hide resolved
java/maven/src/org/netbeans/modules/maven/execute/cmd/ExecMojo.java
Outdated
Show resolved
Hide resolved
java/maven/src/org/netbeans/modules/maven/execute/model/NetbeansActionMapping.java
Show resolved
Hide resolved
ide/projectapi/src/org/netbeans/spi/project/ContainedProjectFilter.java
Outdated
Show resolved
Hide resolved
import org.netbeans.api.project.Project; | ||
|
||
/** | ||
* |
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.
Pls. include some class overview and a description of an example usage (i.e. action acting on several projects may use this to filter). Should be noted that usage is optional and decided by individual actions and must be documented with the action.
I see that in the implementation an empty ContentProjectFilter is treated as no filter; hypotetically (since this is an API) - is there a way how to express that an action working with this selector should operate on the project itself, not any of its children ?
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.
Well, we can introduce filterMode
, which would be filled depending on the list size?
java/gradle.test/src/org/netbeans/modules/gradle/test/GradleTestProgressListener.java
Outdated
Show resolved
Hide resolved
if (project == null) { | ||
return null; | ||
} | ||
return Paths.get(project.getProjectDirectory().getPath(), "src", "test", "java").toString(); |
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.
Not sure about this -- @dbalek: shouldn't we rather use Sources
API to get java/test source group and its folder from the project ?
java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java
Outdated
Show resolved
Hide resolved
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/progress/ModuleInfo.java
Outdated
Show resolved
Hide resolved
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/progress/TestProgressHandler.java
Outdated
Show resolved
Hide resolved
if (project == null) { | ||
return null; | ||
} | ||
return Paths.get(project.getProjectDirectory().getPath(), "src", "test", "java").toString(); |
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.
similar for the usage of Source API - whatever decision is taken.
@@ -132,6 +132,7 @@ public class ActionProviderImpl implements ActionProvider { | |||
"javadoc", //NOI18N | |||
COMMAND_TEST, | |||
COMMAND_TEST_SINGLE, | |||
COMMAND_TEST_PARALLEL, |
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.
bump dependency version on project.api
d717d00
to
a8c4d23
Compare
c3ae922
to
54b4326
Compare
New action for running tests in parallel. It can be invoked via command:
nbls.run.test.parallel
Command support specifying modules for which tests will be ran in parallel. It's up to client to pass the module list, so by default it will run without passed modules.
To test it with module list, it needs to be modified like this:
in
java/java.lsp.server/vscode/src/extension.ts
filemodify line
835
to:testAdapter?.run(new vscode.TestRunRequest(), new vscode.CancellationTokenSource().token, true, ["module1", "module2"]);