ActorLeakSpec fail fix (#30645)

* Wait for a specific association to be lost instead of any association #30639

* Formatting
This commit is contained in:
Johan Andrén 2021-09-10 16:42:46 +02:00 committed by GitHub
parent 9138c43c6a
commit 29e759ca55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,7 @@ import akka.testkit.TestActors.EchoActor
object ActorsLeakSpec {
val config = ConfigFactory.parseString("""
akka.loggers = ["akka.testkit.SilenceAllTestEventListener"]
akka.actor.provider = remote
akka.remote.artery.enabled = false
akka.remote.classic.netty.tcp.applied-adapters = ["trttl"]
@ -174,9 +175,11 @@ class ActorsLeakSpec extends AkkaSpec(ActorsLeakSpec.config) with ImplicitSender
remoteSystem.terminate()
}
EventFilter.warning(pattern = "Association with remote system", occurrences = 1).intercept {
Await.result(remoteSystem.whenTerminated, 10.seconds)
}
EventFilter
.warning(start = s"Association with remote system [${remoteAddress}] has failed", occurrences = 1)
.intercept {
Await.result(remoteSystem.whenTerminated, 10.seconds)
}
}
// Remote idle for too long case