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

Support some level of parallelization in junit-vintage-engine #4135

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

YongGoose
Copy link
Contributor

Overview

Resolves #2229

This PR implements parallel execution support for the JUnit Vintage engine, addressing issue #2229.

  • Implemented concurrent execution of test descriptors when parallel execution is enabled.
  • Updated the JUnit Vintage engine to read parallel configuration parameters. (planned)

Open Question

I haven’t yet worked on the part that handles reading configuration parameters, such as whether parallel execution should be enabled or the number of threads to be used.
Is there a specific configuration format or approach you would recommend for this?


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

Copy link
Member

@marcphilipp marcphilipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting the draft! I left a bunch of comments. 🙂

@YongGoose YongGoose force-pushed the feature/support-parallelization-in-junit-vintage-engine branch from c25db8c to e12b155 Compare November 19, 2024 17:11
@marcphilipp marcphilipp self-requested a review November 20, 2024 17:48
Comment on lines 137 to 147
try {
executorService.shutdown();
if (!executorService.awaitTermination(SHUTDOWN_TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
logger.warn(() -> "Executor service did not terminate within the specified timeout");
executorService.shutdownNow();
}
}
catch (InterruptedException e) {
logger.warn(e, () -> "Interruption while waiting for executor service to shut down");
Thread.currentThread().interrupt();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we extract this into a separate method to improve readability?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea!
I worked on this in the commit 96b31e0

@YongGoose
Copy link
Contributor Author

@marcphilipp

If the parallelization work is completed, I would appreciate it if you could take a look at the Open Question in the PR description 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support some level of parallelization in junit-vintage-engine
2 participants