This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 88f338134c test(dispatch): pin minimum-runnable=-1 in
ForkJoinExecutorConfiguratorSpec auto fixtures (#2894)
88f338134c is described below
commit 88f338134c6a72c3adef8b4d8e4c07c0c13fc2f7
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Fri Apr 24 07:14:07 2026 +0800
test(dispatch): pin minimum-runnable=-1 in ForkJoinExecutorConfiguratorSpec
auto fixtures (#2894)
The `fj-auto-default-dispatcher` and `fj-auto-small-dispatcher` fixtures
left `minimum-runnable` unset, expecting the reference.conf default of
`-1` (which selects the JDK-aware auto policy). The nightly CI workflow
pins `pekko.actor.default-dispatcher.fork-join-executor.minimum-runnable=4`
via -D for JDK 21+ runs (see nightly-builds.yml). That value flows through
the `defaultDispatcherConfig` fallback chain in `Dispatchers.config(id)`,
making `config.getInt("minimum-runnable")` return `4` for the auto fixtures
and breaking the two assertions that expected `1`.
Setting `minimum-runnable = -1` explicitly in both auto fixtures keeps the
spec exercising the JDK-aware policy regardless of the surrounding -D pins.
---
.../apache/pekko/dispatch/ForkJoinExecutorConfiguratorSpec.scala | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfiguratorSpec.scala
b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfiguratorSpec.scala
index 5bf7c12255..20e4ea2a77 100644
---
a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfiguratorSpec.scala
+++
b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfiguratorSpec.scala
@@ -28,7 +28,10 @@ import com.typesafe.config.{ Config, ConfigFactory }
object ForkJoinExecutorConfiguratorSpec {
// Keep the root config explicit so the dispatcher-config integration checks
below
// see exactly the values this spec is asserting on (and not whatever the
project's
- // global test configuration happens to set).
+ // global test configuration happens to set). In particular, the `fj-auto-*`
dispatchers
+ // pin `minimum-runnable = -1` so they always exercise the JDK-aware auto
policy even
+ // when a build pins
`pekko.actor.default-dispatcher.fork-join-executor.minimum-runnable`
+ // via -D (the nightly CI does this on JDK 21+ for stability — see
nightly-builds.yml).
val config: Config = ConfigFactory.parseString("""
|fj-auto-default-dispatcher {
| executor = "fork-join-executor"
@@ -36,6 +39,7 @@ object ForkJoinExecutorConfiguratorSpec {
| parallelism-min = 8
| parallelism-factor = 1.0
| parallelism-max = 64
+ | minimum-runnable = -1
| }
|}
|fj-auto-small-dispatcher {
@@ -44,6 +48,7 @@ object ForkJoinExecutorConfiguratorSpec {
| parallelism-min = 1
| parallelism-factor = 1.0
| parallelism-max = 1
+ | minimum-runnable = -1
| }
|}
|fj-explicit-zero-dispatcher {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]