Avoid ActorsLeakSpec failure (#30539)
* Avoid ActorsLeakSpec failure Would fail when we see two termination warnings right after each other. It would be nicer if we could add a flag to ignore excess messages like we have in the typed testkit, but it doesn't seem worth it to overhaul the API to add that. Fixes #25316 * Await.ready -> Await.result
This commit is contained in:
parent
b7d0ef6526
commit
4c732e9865
1 changed files with 6 additions and 8 deletions
|
|
@ -104,7 +104,7 @@ class ActorsLeakSpec extends AkkaSpec(ActorsLeakSpec.config) with ImplicitSender
|
|||
remoteSystem.terminate()
|
||||
}
|
||||
|
||||
Await.ready(remoteSystem.whenTerminated, 10.seconds)
|
||||
Await.result(remoteSystem.whenTerminated, 10.seconds)
|
||||
}
|
||||
|
||||
// Quarantine an old incarnation case
|
||||
|
|
@ -147,7 +147,7 @@ class ActorsLeakSpec extends AkkaSpec(ActorsLeakSpec.config) with ImplicitSender
|
|||
remoteSystem.terminate()
|
||||
}
|
||||
|
||||
Await.ready(remoteSystem.whenTerminated, 10.seconds)
|
||||
Await.result(remoteSystem.whenTerminated, 10.seconds)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -170,14 +170,14 @@ class ActorsLeakSpec extends AkkaSpec(ActorsLeakSpec.config) with ImplicitSender
|
|||
probe.expectMsgType[ActorIdentity].ref.nonEmpty should be(true)
|
||||
|
||||
// This will make sure that no SHUTDOWN message gets through
|
||||
Await.ready(RARP(system).provider.transport.managementCommand(ForceDisassociate(remoteAddress)), 3.seconds)
|
||||
Await.result(RARP(system).provider.transport.managementCommand(ForceDisassociate(remoteAddress)), 3.seconds)
|
||||
|
||||
} finally {
|
||||
remoteSystem.terminate()
|
||||
}
|
||||
|
||||
EventFilter.warning(pattern = "Association with remote system", occurrences = 1).intercept {
|
||||
Await.ready(remoteSystem.whenTerminated, 10.seconds)
|
||||
Await.result(remoteSystem.whenTerminated, 10.seconds)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -203,15 +203,13 @@ class ActorsLeakSpec extends AkkaSpec(ActorsLeakSpec.config) with ImplicitSender
|
|||
// All system messages has been acked now on this side
|
||||
|
||||
// This will make sure that no SHUTDOWN message gets through
|
||||
Await.ready(RARP(system).provider.transport.managementCommand(ForceDisassociate(remoteAddress)), 3.seconds)
|
||||
Await.result(RARP(system).provider.transport.managementCommand(ForceDisassociate(remoteAddress)), 3.seconds)
|
||||
|
||||
} finally {
|
||||
remoteSystem.terminate()
|
||||
}
|
||||
|
||||
EventFilter.warning(pattern = "Association with remote system", occurrences = 1).intercept {
|
||||
Await.ready(remoteSystem.whenTerminated, 10.seconds)
|
||||
}
|
||||
Await.result(remoteSystem.whenTerminated, 10.seconds)
|
||||
|
||||
EventFilter[TimeoutException](occurrences = 1).intercept {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue