This is an automated email from the ASF dual-hosted git repository. He-Pin pushed a commit to branch fix/ci-remote-send-consistency-fork in repository https://gitbox.apache.org/repos/asf/pekko.git
commit 95562ce27ba7c7f1739bb1abf9fbbfe1e69ba42c Author: 虎鸣 <[email protected]> AuthorDate: Sat Jun 20 05:28:31 2026 +0800 test: isolate SendConsistency specs into separate JVM forks Motivation: ArteryTlsTcpSendConsistencyWithOneLaneSpec flakes on CI because it creates 2 ActorSystems with TLS-TCP transport and runs 1000 round-trip message exchanges via ActorSelection. When other test classes run in the same forked JVM, lingering ActorSystem threads from previous tests consume CPU and compete with the TLS operations, causing the test to exceed its 60-second timeout (30s × timefactor=2). Modification: Add Tests.Group configuration to the remote module that partitions SendConsistency test classes into their own SubProcess (forked JVM), while keeping all other remote tests in a shared "other" group. Each SendConsistency spec gets a clean JVM with no thread contention from previously-run test classes. Result: SendConsistency specs run in isolated JVM forks, eliminating cross-test thread contention that caused the 1-lane TLS-TCP variant to flake. Tests: sbt -Dpekko.test.timefactor=2 "remote / Test / testOnly *ArteryTlsTcpSendConsistencyWithOneLaneSpec" — 4/4 passed sbt "show remote / Test / testGrouping" — verified 6 SendConsistency groups + 1 "other" group References: Refs #3089 --- build.sbt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/build.sbt b/build.sbt index b2fc153f84..9c3733c450 100644 --- a/build.sbt +++ b/build.sbt @@ -434,6 +434,24 @@ lazy val remote = .settings(OSGi.remote) .settings(Protobuf.settings) .settings(Test / parallelExecution := false) + .settings( + // Isolate SendConsistency specs that create multiple ActorSystems + // with TLS-TCP and 1000 round-trip message exchanges into their own + // JVM fork. These specs are sensitive to thread contention from + // lingering ActorSystem threads of other test classes in the same JVM. + Test / testGrouping := { + val allTests = (Test / definedTests).value + val (sendConsistencyTests, otherTests) = + allTests.partition(_.name.contains("SendConsistency")) + val defaultForkOptions = ForkOptions() + .withRunJVMOptions((Test / javaOptions).value.toVector) + val otherGroup = + Tests.Group("other", otherTests, Tests.SubProcess(defaultForkOptions)) + val sendConsistencyGroups = sendConsistencyTests.map { t => + Tests.Group(t.name, Seq(t), Tests.SubProcess(defaultForkOptions)) + } + otherGroup +: sendConsistencyGroups + }) .enablePlugins(DependWalkerPlugin, SbtOsgi) lazy val remoteTests = pekkoModule("remote-tests") --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
