-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implement Parallel Method Execution in JUnit-Vintage engine #4242
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
Conversation
I created this Draft PR to ask a few questions. However, I have a question regarding their behavior:
|
62d4652
to
0cd9f4d
Compare
I think we should check for that, log a warning (like we do for invalid configuration parameters in Jupiter), and continue as if
I think turning off parallel execution (using the |
Issue: junit-team#4058
Done in be5234f ! |
b09c55e
to
36ac248
Compare
36ac248
to
0b70615
Compare
I implemented this to get feedback on parallelization at the class and method levels. 0b70615
There are three scenarios when running parallel tests:
I want to design it similarly to JUnit 4's ParallelComputer, but I need help..🥹 |
junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java
Outdated
Show resolved
Hide resolved
...t-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerTestDescriptor.java
Outdated
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerScheduler.java
Outdated
Show resolved
Hide resolved
…scriptor/RunnerTestDescriptor.java Co-authored-by: Marc Philipp <mail@marcphilipp.de>
4da4954
to
29e5e11
Compare
Issue: junit-team#4238
29e5e11
to
e92e834
Compare
While writing test code, I discovered an issue caused by using the same
Assumption: Lets assume the thread pool size of the ExecutorService is Scenario:
To prevent this issue, we could either set a timeout on WDYT? I’m also curious whether this issue will be included in version 5.12M1 or 5.13. |
Issue: junit-team#4238
I am eager to resolve this issue😀 |
@YongGoose Sorry for the slow response! I was traveling for the last few days. That's a good catch! For Jupiter, we use a |
Apologies if I came across as rude.
I didn’t know that! |
No worries!
Jupiter uses |
I’m running into some challenges trying to use Before moving forward, I’d like to get your feedback on the best approach here!
Which direction do you think makes more sense? |
I think option 1 won't work because Vintage can't implement |
Thank you! I’ll proceed as you suggested. As for another PR I’m working on, I accidentally included commits from the main branch while resolving git conflicts. So, I’m planning to create a new PR 😅 |
Issue: junit-team#4238
Thank you for the detailed explanation. I wasn't very familiar with the internal structure of the As you advised, I will not implement this feature in the Vintage engine for now. |
I have completed the documentation and changed the PR status from PS. I don't think I could have completed this work without your help. |
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
documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-RC1.adoc
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-RC2.adoc
Outdated
Show resolved
Hide resolved
4500bfa
to
b7734a5
Compare
Both of you, thank you! 🙂 |
documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-RC2.adoc
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-RC1.adoc
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc
Outdated
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/VintageExecutor.java
Outdated
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/VintageExecutor.java
Outdated
Show resolved
Hide resolved
junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/VintageExecutor.java
Outdated
Show resolved
Hide resolved
…t4.adoc Co-authored-by: Marc Philipp <mail@marcphilipp.de>
…12.0-RC2.adoc Co-authored-by: Marc Philipp <mail@marcphilipp.de>
- create VintageExecutor Issue: junit-team#4238
@YongGoose Once again, thanks for all your work! 👍 |
Resolves: #4238
Overview
Implements parallel execution of test methods in the junit-vintage-engine, inspired by the parallelization support available in JUnit 4 through
ParallelComputer
.Changes
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations