Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

petrovic-d
Copy link
Contributor

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 file
modify line 835 to:
testAdapter?.run(new vscode.TestRunRequest(), new vscode.CancellationTokenSource().token, true, ["module1", "module2"]);

@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) Gradle [ci] enable "build tools" tests Maven [ci] enable "build tools" tests tests LSP [ci] enable Language Server Protocol tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Nov 22, 2024
@apache apache locked and limited conversation to collaborators Nov 22, 2024
@apache apache unlocked this conversation Nov 22, 2024
@MartinBalin MartinBalin requested review from dbalek, lahodaj, sdedic and lkishalmi and removed request for lahodaj November 25, 2024 16:33
@sdedic sdedic added API Change [ci] enable extra API related tests kind:feature A feature request labels Nov 30, 2024
import org.netbeans.api.project.Project;

/**
*
Copy link
Member

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 ?

Copy link
Contributor Author

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?

if (project == null) {
return null;
}
return Paths.get(project.getProjectDirectory().getPath(), "src", "test", "java").toString();
Copy link
Member

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 ?

if (project == null) {
return null;
}
return Paths.get(project.getProjectDirectory().getPath(), "src", "test", "java").toString();
Copy link
Member

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,
Copy link
Member

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

@petrovic-d petrovic-d force-pushed the action-for-running-tests-in-parallel branch from d717d00 to a8c4d23 Compare December 4, 2024 14:42
@petrovic-d petrovic-d force-pushed the action-for-running-tests-in-parallel branch from c3ae922 to 54b4326 Compare December 4, 2024 15:18
@neilcsmith-net neilcsmith-net dismissed their stale review December 4, 2024 17:09

Issue addressed

@neilcsmith-net neilcsmith-net removed their request for review December 4, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Change [ci] enable extra API related tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Gradle [ci] enable "build tools" tests Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) kind:feature A feature request LSP [ci] enable Language Server Protocol tests Maven [ci] enable "build tools" tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants