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 bc4903dada test: make classic remoting handoff assertion eventual 
(#3318)
bc4903dada is described below

commit bc4903dada82d6fa1b858727e4ca542a47885b13
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Sat Jul 11 06:51:03 2026 +0800

    test: make classic remoting handoff assertion eventual (#3318)
    
    Motivation:
    The passive read handoff spec observes handle disassociation before the 
original reader has necessarily processed ResumeReading, making its single 
verification message timing-dependent.
    
    Modification:
    Retry the verification message with awaitAssert and a bounded per-attempt 
timeout until the outbound reader resumes.
    
    Result:
    The regression test still fails when reader recovery never happens while 
tolerating the expected cross-actor handoff delay.
    
    Tests:
    - JDK 17, Scala 3.8.4 focused RemotingSpec test: passed
    - JDK 17, Scala 3.8.4 full RemotingSpec: 22 passed
    - JDK 17, Scala 2.13.18 focused RemotingSpec test: passed
    - sbt headerCreateAll +headerCheckAll: passed
    - scalafmt --list --mode diff-ref=origin/main: passed
    - git diff --check: passed
    
    References:
    Refs #3205
---
 .../test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/remote/src/test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala 
b/remote/src/test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala
index cbed60cd92..ae79f265c6 100644
--- a/remote/src/test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala
+++ b/remote/src/test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala
@@ -793,8 +793,12 @@ class RemotingSpec extends PekkoSpec(RemotingSpec.cfg) 
with ImplicitSender with
           case _                                  => false
         }
 
-        
outboundRemoteHandle.association.write(payload("after-handoff-failure"))
-        receiverProbe.expectMsg("after-handoff-failure")
+        // The read-only handle disassociation and resuming the outbound 
reader are handled by different actors.
+        // Retry until the outbound reader has processed ResumeReading.
+        awaitAssert {
+          
outboundRemoteHandle.association.write(payload("after-handoff-failure"))
+          receiverProbe.expectMsg(500.millis, "after-handoff-failure")
+        }
       } finally shutdown(thisSystem)
 
     }


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

Reply via email to