This is an automated email from the ASF dual-hosted git repository. He-Pin pushed a commit to branch fix/jdk25-tck-shutdown-phase-base in repository https://gitbox.apache.org/repos/asf/pekko.git
commit 66b5e964724c4b70425f84184edfb3830d5f6bf0 Author: He-Pin <[email protected]> AuthorDate: Fri May 29 16:22:14 2026 +0800 test: widen TCK actor-system-terminate phase timeout Motivation: FlattenTest and FilePublisherTest abort the TCK suite on JDK 25 nightly runs with: [WARN] CoordinatedShutdown(pekko://FlattenTest) Coordinated shutdown phase [actor-system-terminate] timed out after 10000 milliseconds java.lang.RuntimeException: Failed to stop [FlattenTest] within [40000 milliseconds] toDie: Actor[pekko://FlattenTest/system/Materializers/ StreamSupervisor-4/flow-6-0-flattenMerge#-2133714097] The outer 40s shutdown await scales with `pekko.test.timefactor` (via Timeouts.actorSystemShutdownTimeoutMillis), but the inner CoordinatedShutdown `actor-system-terminate` phase keeps its default 10s, which is occasionally too tight on JDK 25 nightlies where virtualized dispatchers + heavy stochastic TCK iterations leave a stream actor mid-shutdown. The phase times out before the last flow actor finishes terminating, even though the outer await still has 30s of headroom. Modification: - ActorSystemLifecycle now layers a baseline config under `additionalConfig`, widening the `actor-system-terminate` phase timeout from 10s to 30s for every TCK ActorSystem (Publisher, Subscriber, and IdentityProcessor verifications). - The baseline is applied via `withFallback` so any subclass `additionalConfig` override that explicitly sets the same key still wins. Result: The inner phase now has 30s to drain leftover materializations before the outer 40s await fires (timeFactor=4 on JDK 25 nightly), removing the abort path observed for FlattenTest and FilePublisherTest without changing behaviour on local runs (where shutdown completes well under 1s). --- .../org/apache/pekko/stream/tck/ActorSystemLifecycle.scala | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ActorSystemLifecycle.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ActorSystemLifecycle.scala index bb4c8b7667..4d8f0bb60e 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ActorSystemLifecycle.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ActorSystemLifecycle.scala @@ -42,9 +42,19 @@ trait ActorSystemLifecycle { def shutdownTimeout: FiniteDuration = Timeouts.actorSystemShutdownTimeoutMillis.millis + // Always-applied baseline for TCK ActorSystems. The default Pekko + // `actor-system-terminate` phase timeout is 10s, which is occasionally too + // tight on JDK 25 nightly runs (virtualized dispatchers + heavy stochastic + // TCK iterations leave stream actors mid-shutdown). Widening the phase + // timeout gives the outer 40s shutdown await (see Timeouts) enough room to + // drain leftover materializations cleanly instead of aborting the suite. + private def baselineConfig: Config = + ConfigFactory.parseString("pekko.coordinated-shutdown.phases.actor-system-terminate.timeout = 30 s") + @BeforeClass def createActorSystem(): Unit = { - _system = ActorSystem(Logging.simpleName(getClass), additionalConfig.withFallback(PekkoSpec.testConf)) + val config = additionalConfig.withFallback(baselineConfig).withFallback(PekkoSpec.testConf) + _system = ActorSystem(Logging.simpleName(getClass), config) _system.eventStream.publish(TestEvent.Mute(EventFilter[RuntimeException]("Test exception"))) } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
