-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
base: main
Are you sure you want to change the base?
Support some level of parallelization in junit-vintage-engine #4135
Conversation
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 submitting the draft! I left a bunch of comments. 🙂
junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java
Outdated
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java
Outdated
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java
Outdated
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java
Outdated
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java
Outdated
Show resolved
Hide resolved
Signed-off-by: yongjunhong <[email protected]>
c25db8c
to
e12b155
Compare
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(); | ||
} |
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.
Can we extract this into a separate method to improve readability?
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.
Great idea!
I worked on this in the commit 96b31e0
Issue: junit-team#3717 Signed-off-by: yongjunhong <[email protected]>
If the parallelization work is completed, I would appreciate it if you could take a look at the Open Question in the PR description 😀 |
Overview
Resolves #2229
This PR implements parallel execution support for the JUnit Vintage engine, addressing issue #2229.
concurrent execution
of test descriptors when parallel execution is enabled.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
@API
annotations