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 ac88902422 test: widen HandshakeRetrySpec buffered-message timeout
(#3012)
ac88902422 is described below
commit ac889024224f7ba451cf717ccf2e9e3c4c923e7f
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Sat May 30 05:10:41 2026 +0800
test: widen HandshakeRetrySpec buffered-message timeout (#3012)
Motivation:
HandshakeRetrySpec "be retried during handshake-timeout (no message loss)"
is intermittently flaky in CI, timing out at expectMsg while waiting for
"hello" (issues #560, #634, #276). The first message is sent before systemB
exists, so it is buffered while the outbound handshake is retried, and is
only delivered once the handshake completes. With handshake-timeout = 10s,
delivery can legitimately take longer than the default expect timeout
(single-expect-default, ~6s under timefactor 2 in CI), so the assertion
fires before the message arrives even though no message is actually lost.
Modification:
Wait for the buffered "hello" with an explicit 15s timeout (dilated by
pekko.test.timefactor), comfortably above the 10s handshake-timeout.
Result:
The test no longer races the handshake window under CI load; it still
passes locally.
References:
Fixes #560
Fixes #634
Fixes #276
---
.../scala/org/apache/pekko/remote/artery/HandshakeRetrySpec.scala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeRetrySpec.scala
b/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeRetrySpec.scala
index cbce270c20..2c327445b7 100644
---
a/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeRetrySpec.scala
+++
b/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeRetrySpec.scala
@@ -45,7 +45,10 @@ class HandshakeRetrySpec extends
ArteryMultiNodeSpec(HandshakeRetrySpec.commonCo
newRemoteSystem(name = Some("systemB"), extraConfig =
Some(s"pekko.remote.artery.canonical.port = $portB"))
systemB.actorOf(TestActors.echoActorProps, "echo")
- expectMsg("hello")
+ // The first message is buffered while the outbound handshake is retried
and is only
+ // delivered once the handshake completes, which can take up to
handshake-timeout (10s).
+ // The default expect timeout is too tight under CI load, so wait well
beyond it.
+ expectMsg(15.seconds, "hello")
sel ! Identify(None)
val remoteRef = expectMsgType[ActorIdentity].ref.get
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]