-
-
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
Allow specifying ForkJoinPool saturate predicate #2792
Conversation
Add the method getSaturatePredicate to the interface ParallelExecutionConfiguration. This allows a custom configuration to supply a predicate to handle the case where the ForkJoinPool has reached the maximum pool size but all threads are currently blocked. Add a constructor to DefaultParallelExecutionConfiguration allowing to speciy the predicate and modify the existing constructor to specify null for the predicate. Modify DefaultParallelExecutionConfigurationStrategyTests to check the saturate predicate value in the default and custom configurations. Issue: junit-team#2787
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.
Hello @klease, I made a few comments and launched the CI builds :)
documentation/src/docs/asciidoc/release-notes/release-notes-5.9.0-M1.adoc
Outdated
Show resolved
Hide resolved
...main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java
Outdated
Show resolved
Hide resolved
...main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #2792 +/- ##
=========================================
Coverage 91.30% 91.30%
- Complexity 4509 4510 +1
=========================================
Files 390 391 +1
Lines 10936 10937 +1
Branches 846 846
=========================================
+ Hits 9985 9986 +1
Misses 730 730
Partials 221 221
Continue to review full report at Codecov.
|
...main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java
Outdated
Show resolved
Hide resolved
...main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java
Outdated
Show resolved
Hide resolved
...main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java
Outdated
Show resolved
Hide resolved
...va/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfiguration.java
Outdated
Show resolved
Hide resolved
...main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java
Show resolved
Hide resolved
...main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/release-notes/release-notes-5.9.0-M1.adoc
Outdated
Show resolved
Hide resolved
...platform/engine/support/hierarchical/DefaultParallelExecutionConfigurationStrategyTests.java
Outdated
Show resolved
Hide resolved
…9.0-M1.adoc Co-authored-by: Marc Philipp <[email protected]>
Also helps to address following issue related to Java 17 changes to ForkJoinPool: https://stackoverflow.com/questions/69768534/why-does-java-17-throw-a-rejectedexecutionexception-when-adding-tasks-to-a-forkj |
…t to supply a custom implementation with the saturate predicate
All requested changes are now committed. |
Comments have been addressed.
Thanks @marcphilipp! |
Thanks to you and sorry for the delay! |
Add the method getSaturatePredicate to the interface ParallelExecutionConfiguration.
This allows a custom configuration to supply a predicate to handle the case
where the ForkJoinPool has reached the maximum pool size but all threads
are currently blocked.
Add a constructor to DefaultParallelExecutionConfiguration allowing to
speciy the predicate and modify the existing constructor to specify
null for the predicate.
Modify DefaultParallelExecutionConfigurationStrategyTests to check the
saturate predicate value in the default and custom configurations.
Issue: #2787
I hereby agree to the terms of the JUnit Contributor License Agreement.