From ba3c8fdd5b42d9e43ca09775d57c279d4dc54113 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 7 Dec 2024 20:33:18 +0100 Subject: [PATCH] rework test --- .../apache/pekko/remote/artery/HarmlessQuarantineSpec.scala | 4 ++-- .../apache/pekko/remote/artery/OutboundIdleShutdownSpec.scala | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/HarmlessQuarantineSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/HarmlessQuarantineSpec.scala index 2826bd8525..eae4dd97a9 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/HarmlessQuarantineSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/HarmlessQuarantineSpec.scala @@ -77,8 +77,8 @@ class HarmlessQuarantineSpec extends ArteryMultiNodeSpec(""" association.associationState.isQuarantined(remoteUid) shouldBe true association.associationState.quarantinedButHarmless(remoteUid) shouldBe false + remoteEcho.tell("ping", localEchoRef) // trigger sending message from remote to local, which will trigger local to wrongfully notify remote that it is quarantined eventually { - remoteEcho.tell("ping", localEchoRef) // trigger sending message from remote to local, which will trigger local to wrongfully notify remote that it is quarantined expectMsgType[ThisActorSystemQuarantinedEvent] // this is what remote emits when it learns it is quarantined by local } } @@ -104,8 +104,8 @@ class HarmlessQuarantineSpec extends ArteryMultiNodeSpec(""" association.associationState.isQuarantined(remoteUid) shouldBe true association.associationState.quarantinedButHarmless(remoteUid) shouldBe true + remoteEcho.tell("ping", localEchoRef) // trigger sending message from remote to local, which will trigger local to wrongfully notify remote that it is quarantined eventually { - remoteEcho.tell("ping", localEchoRef) // trigger sending message from remote to local, which will trigger local to wrongfully notify remote that it is quarantined expectNoMessage() } } diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundIdleShutdownSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundIdleShutdownSpec.scala index c56377aa2e..8846c40f44 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundIdleShutdownSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundIdleShutdownSpec.scala @@ -173,8 +173,8 @@ class OutboundIdleShutdownSpec extends ArteryMultiNodeSpec(""" association.associationState.isQuarantined(remoteUid) shouldBe true association.associationState.quarantinedButHarmless(remoteUid) shouldBe false + remoteEcho.tell("ping", localEchoRef) // trigger sending message from remote to local, which will trigger local to wrongfully notify remote that it is quarantined eventually { - remoteEcho.tell("ping", localEchoRef) // trigger sending message from remote to local, which will trigger local to wrongfully notify remote that it is quarantined expectMsgType[ThisActorSystemQuarantinedEvent] // this is what remote emits when it learns it is quarantined by local } } @@ -200,8 +200,8 @@ class OutboundIdleShutdownSpec extends ArteryMultiNodeSpec(""" association.associationState.isQuarantined(remoteUid) shouldBe true association.associationState.quarantinedButHarmless(remoteUid) shouldBe true + remoteEcho.tell("ping", localEchoRef) // trigger sending message from remote to local, which will trigger local to wrongfully notify remote that it is quarantined eventually { - remoteEcho.tell("ping", localEchoRef) // trigger sending message from remote to local, which will trigger local to wrongfully notify remote that it is quarantined expectMsgType[ThisActorSystemQuarantinedEvent] // this is what remote emits when it learns it is quarantined by local } }