Skip to content

Commit

Permalink
Harden RemoteFailureSpec, #31250 (#31709)
Browse files Browse the repository at this point in the history
* Reduced to 3 remote ActorSystems, in case it was too heavy to
  run 6 in CI
* Adding a first message identification check (at least easier to diagnose)
  • Loading branch information
patriknw committed Oct 31, 2022
1 parent e2b16e2 commit 77f8c25
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -6,6 +6,8 @@ package akka.remote.artery

import scala.concurrent.duration._

import akka.actor.ActorIdentity
import akka.actor.Identify
import akka.remote.EndpointDisassociatedException
import akka.serialization.jackson.CborSerializable
import akka.testkit.{ EventFilter, ImplicitSender, TestActors, TestEvent }
Expand All @@ -24,15 +26,19 @@ class RemoteFailureSpec extends ArteryMultiNodeSpec with ImplicitSender {
"Remoting" should {

"not be exhausted by sending to broken connections" in {
val remoteSystems = Vector.fill(5)(newRemoteSystem())
val remoteSystems = Vector.fill(3)(newRemoteSystem())

remoteSystems.foreach { sys =>
sys.eventStream.publish(TestEvent
.Mute(EventFilter[EndpointDisassociatedException](), EventFilter.warning(pattern = "received dead letter.*")))
sys.actorOf(TestActors.echoActorProps, name = "echo")
}
val remoteSelections = remoteSystems.map { sys =>
system.actorSelection(rootActorPath(sys) / "user" / "echo")
val sel = system.actorSelection(rootActorPath(sys) / "user" / "echo")
// verify that it's are there
sel ! Identify(sel.toSerializationFormat)
expectMsgType[ActorIdentity].ref.isDefined should ===(true)
sel
}

system.actorOf(TestActors.echoActorProps, name = "echo")
Expand Down

0 comments on commit 77f8c25

Please sign in to comment.