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 900e1f65f1 test: ignore late identities while awaiting rotating-keys
ping (#3001)
900e1f65f1 is described below
commit 900e1f65f12379b8daf12a93b19f6eec9c3b376f
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Fri May 29 14:03:45 2026 +0800
test: ignore late identities while awaiting rotating-keys ping (#3001)
Motivation:
RotatingKeysSSLEngineProviderSpec can receive a delayed ActorIdentity from
an earlier Identify attempt after the target actor ref has already been
resolved. Nightly retry policy still fails builds when that stale identity
arrives before the ping reply.
Modification:
Wait for the expected ping with fishForMessage and ignore late
ActorIdentity messages while keeping the same per-attempt timeout budget.
Result:
The test accepts the intended ping reply without being failed by harmless
delayed Identify responses.
Tests:
- JDK 21: remote / Test / testOnly
org.apache.pekko.remote.artery.tcp.ssl.RotatingProviderWithChangingKeysSpec
- JDK 25: remote / Test / testOnly
org.apache.pekko.remote.artery.tcp.ssl.RotatingProviderWithChangingKeysSpec
(fails on existing JDK 25 EKU certificate validation behavior)
- scalafmt --mode diff-ref=origin/main --quiet
- scalafmt --list --mode diff-ref=origin/main
- git diff --check
References:
Refs #2994
---
.../remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala
b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala
index 52b35e9458..2cda6257f6 100644
---
a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala
+++
b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala
@@ -302,7 +302,10 @@ abstract class
RotatingKeysSSLEngineProviderSpec(extraConfig: String)
val ref = targetRef.getOrElse(
fail(s"Timed out waiting for ActorIdentity from $toPath after
$maxAttempts attempts"))
ref.tell("ping-1", senderOnSource.ref)
- senderOnSource.expectMsg("ping-1")
+ senderOnSource.fishForMessage(identifyTimeout, hint = "waiting for
ping-1") {
+ case "ping-1" => true
+ case ActorIdentity(_, _) => false
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]