This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 821e4db553ee CAMEL-25260: Set the JUnit parallel executor-service to
FORK_JOIN_POOL to silence the warning (#27579)
821e4db553ee is described below
commit 821e4db553ee8afeaf54b896bd943eb9aef05dbd
Author: Guillaume Nodet <[email protected]>
AuthorDate: Wed Oct 14 13:47:34 2026 +0200
CAMEL-25260: Set the JUnit parallel executor-service to FORK_JOIN_POOL to
silence the warning (#27579)
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
---
components/pom.xml | 1 +
.../java/org/apache/camel/CamelParallelExecutionStrategy.java | 10 ++++++++--
core/camel-core/src/test/resources/junit-platform.properties | 1 +
parent/pom.xml | 1 +
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/components/pom.xml b/components/pom.xml
index 3e6e380567f3..e854247e5aff 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -575,6 +575,7 @@
<junit.jupiter.execution.parallel.mode.classes.default>concurrent</junit.jupiter.execution.parallel.mode.classes.default>
<junit.jupiter.execution.parallel.config.strategy>${camel.failsafe.parallel.strategy}</junit.jupiter.execution.parallel.config.strategy>
<junit.jupiter.execution.parallel.config.dynamic.factor>${camel.failsafe.parallel.factor}</junit.jupiter.execution.parallel.config.dynamic.factor>
+
<junit.jupiter.execution.parallel.config.executor-service>FORK_JOIN_POOL</junit.jupiter.execution.parallel.config.executor-service>
</systemPropertyVariables>
</configuration>
<executions>
diff --git
a/core/camel-core/src/test/java/org/apache/camel/CamelParallelExecutionStrategy.java
b/core/camel-core/src/test/java/org/apache/camel/CamelParallelExecutionStrategy.java
index d8619b57ecd6..553886664bac 100644
---
a/core/camel-core/src/test/java/org/apache/camel/CamelParallelExecutionStrategy.java
+++
b/core/camel-core/src/test/java/org/apache/camel/CamelParallelExecutionStrategy.java
@@ -27,8 +27,14 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Customize Junit5 parallel execution strategy to use more threads than the
default 256. The number of threads and the
- * parallelism are set in junit-platform.properties.
+ * Custom JUnit parallel execution strategy. Configures parallelism and max
pool size via junit-platform.properties
+ * (keys {@code custom.parallelism} and {@code custom.maxPoolSize}).
+ * <p>
+ * Used together with {@code
junit.jupiter.execution.parallel.config.executor-service=FORK_JOIN_POOL} so that
+ * {@link CamelParallelExecutionConfiguration#getSaturatePredicate()} is
active and logs a warning when the ForkJoinPool
+ * saturates. The saturation predicate is only invoked by the {@code
FORK_JOIN_POOL} executor; it is silently ignored by
+ * {@code WORKER_THREAD_POOL}.
+ * </p>
*/
public class CamelParallelExecutionStrategy implements
ParallelExecutionConfigurationStrategy {
diff --git a/core/camel-core/src/test/resources/junit-platform.properties
b/core/camel-core/src/test/resources/junit-platform.properties
index 6f38e83b4cc9..60d8fad77c4c 100644
--- a/core/camel-core/src/test/resources/junit-platform.properties
+++ b/core/camel-core/src/test/resources/junit-platform.properties
@@ -22,3 +22,4 @@ junit.jupiter.execution.parallel.config.strategy = custom
junit.jupiter.execution.parallel.config.custom.parallelism = 4
junit.jupiter.execution.parallel.config.custom.maxPoolSize = 512
junit.jupiter.execution.parallel.config.custom.class=org.apache.camel.CamelParallelExecutionStrategy
+junit.jupiter.execution.parallel.config.executor-service = FORK_JOIN_POOL
diff --git a/parent/pom.xml b/parent/pom.xml
index 1f2136b02a1e..4082bceb2c2a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -4535,6 +4535,7 @@
junit.jupiter.execution.parallel.mode.classes.default = concurrent
junit.jupiter.execution.parallel.config.strategy =
${camel.surefire.parallel.strategy}
junit.jupiter.execution.parallel.config.dynamic.factor =
${camel.surefire.parallel.factor}
+
junit.jupiter.execution.parallel.config.executor-service = FORK_JOIN_POOL
junit.jupiter.execution.timeout.default =
10 m
</configurationParameters>
</properties>