This is an automated email from the ASF dual-hosted git repository.

hepin 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 01788cfecb Fix flaky PersistentActorRecoveryTimeoutSpec under CI load 
(#2817) (#2819)
01788cfecb is described below

commit 01788cfecbf9a7b0d87c731c00f28803c58b22f5
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Sat Mar 28 19:36:23 2026 +0800

    Fix flaky PersistentActorRecoveryTimeoutSpec under CI load (#2817) (#2819)
    
    Increase recovery-event-timeout from 1s to 3s in both classic and typed
    recovery timeout specs. The 1s timeout was too tight for CI environments
    under load (especially Scala 3.3.x cross-compilation), causing spurious
    RecoveryTimedOut failures.
    
    Also add explicit 10s timeout on expectMsgType/expectMessageType since
    the default expect timeout (3s) equals the recovery timeout, which would
    cause deterministic failures.
    
    Closes #2817
---
 .../typed/scaladsl/EventSourcedBehaviorRecoveryTimeoutSpec.scala     | 5 +++--
 .../pekko/persistence/PersistentActorRecoveryTimeoutSpec.scala       | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRecoveryTimeoutSpec.scala
 
b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRecoveryTimeoutSpec.scala
index c08b0e6539..b9e9ae21c4 100644
--- 
a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRecoveryTimeoutSpec.scala
+++ 
b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRecoveryTimeoutSpec.scala
@@ -41,7 +41,7 @@ object EventSourcedBehaviorRecoveryTimeoutSpec {
     SteppingInmemJournal
       .config(journalId)
       .withFallback(ConfigFactory.parseString("""
-        pekko.persistence.journal.stepping-inmem.recovery-event-timeout=1s
+        pekko.persistence.journal.stepping-inmem.recovery-event-timeout=3s
         """))
       .withFallback(ConfigFactory.parseString(s"""
         pekko.loglevel = INFO
@@ -106,7 +106,8 @@ class EventSourcedBehaviorRecoveryTimeoutSpec
           // initial read highest
           SteppingInmemJournal.step(journal)
 
-          probe.expectMessageType[RecoveryTimedOut]
+          // recovery-event-timeout is set to 3s; allow extra headroom for CI
+          probe.expectMessageType[RecoveryTimedOut](10.seconds)
           probe.expectTerminated(replaying)
         }
 
diff --git 
a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorRecoveryTimeoutSpec.scala
 
b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorRecoveryTimeoutSpec.scala
index 248c34a7d9..2573ccd6b1 100644
--- 
a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorRecoveryTimeoutSpec.scala
+++ 
b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorRecoveryTimeoutSpec.scala
@@ -30,7 +30,7 @@ object PersistentActorRecoveryTimeoutSpec {
     SteppingInmemJournal
       .config(PersistentActorRecoveryTimeoutSpec.journalId)
       .withFallback(ConfigFactory.parseString("""
-          |pekko.persistence.journal.stepping-inmem.recovery-event-timeout=1s
+          |pekko.persistence.journal.stepping-inmem.recovery-event-timeout=3s
         """.stripMargin))
       .withFallback(PersistenceSpec.config("stepping-inmem", 
"PersistentActorRecoveryTimeoutSpec"))
 
@@ -111,7 +111,8 @@ class PersistentActorRecoveryTimeoutSpec
       // initial read highest
       SteppingInmemJournal.step(journal)
 
-      probe.expectMsgType[Failure].cause shouldBe a[RecoveryTimedOut]
+      // recovery-event-timeout is set to 3s; allow extra headroom for CI
+      probe.expectMsgType[Failure](10.seconds).cause shouldBe 
a[RecoveryTimedOut]
       expectTerminated(replaying)
 
       // avoid having it stuck in the next test from the


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to