Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1369

Akka-test: how do I expectTerminated for two actors in Java API?

$
0
0

@baltiyskiy wrote:

In my test, I have two actors, A and B. I need to verify that both of them are terminated.

Obviously, this doesn’t work:

testKit.expectTerminated(actorA);
testKit.expectTerminated(actorB);

That’s because actor B’s termination message can become before A’s, and the first assertion will fail.

I see that in Scala API, there’s a nifty method expectMsgAllClassOf(), but there’s no such method in Java API.

What’s the expected way to do this in Java API?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 1369

Trending Articles