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

Implement Parallel Method Execution in JUnit-Vintage engine #4238

Open
3 tasks
YongGoose opened this issue Jan 8, 2025 · 3 comments · May be fixed by #4242
Open
3 tasks

Implement Parallel Method Execution in JUnit-Vintage engine #4238

YongGoose opened this issue Jan 8, 2025 · 3 comments · May be fixed by #4242

Comments

@YongGoose
Copy link
Contributor

YongGoose commented Jan 8, 2025

Description

JUnit 4 allows running methods in parallel by setting a RunnerScheduler for ParentRunner subclasses.
This issue aim to implement this feature to improve test execution performance.

Objectives

  • Implement parallel execution of test methods
  • Adjust existing tests to verify method parallelization

Deliverables

  • Implement custom RunnerScheduler using ExecutorService
  • Update tests to verify parallel method execution
  • Document usage and performance implications

This issue is a follow-up task to the issue below.

@YongGoose
Copy link
Contributor Author

@marcphilipp

I plan to add a property to the JUnit-Vintage engine, similar to the two property values in the JUnit-Jupiter engine, to select whether only classes should be run in parallel or only methods should be run in parallel.

  • junit.jupiter.execution.parallel.mode.default
  • junit.jupiter.execution.parallel.mode.classes.default

plan to implement it similar to JUnit4's ParallelComputer

I will complete the implementation by tomorrow and create a PR.
If you have any better suggestions, please let me know in the comments! 😁

@marcphilipp
Copy link
Member

I think we should have two independent configuration parameters: one for classes and one for methods.

  • junit.vintage.execution.parallel.classes
  • junit.vintage.execution.parallel.methods

@YongGoose
Copy link
Contributor Author

I think we should have two independent configuration parameters: one for classes and one for methods.

  • junit.vintage.execution.parallel.classes
  • junit.vintage.execution.parallel.methods

Thank you for the suggestion 👍🏻

I’ll implement the two configuration parameters as you suggested :D

YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 11, 2025
@YongGoose YongGoose linked a pull request Jan 11, 2025 that will close this issue
6 tasks
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants