Search in sources :

Example 1 with MessageCollectorActor

use of org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor in project controller by opendaylight.

the class ShardTest method testServerRemoved.

@Test
public void testServerRemoved() throws Exception {
    final TestActorRef<MessageCollectorActor> parent = actorFactory.createTestActor(MessageCollectorActor.props().withDispatcher(Dispatchers.DefaultDispatcherId()));
    final ActorRef shard = parent.underlyingActor().context().actorOf(newShardBuilder().props().withDispatcher(Dispatchers.DefaultDispatcherId()), "testServerRemoved");
    shard.tell(new ServerRemoved("test"), ActorRef.noSender());
    MessageCollectorActor.expectFirstMatching(parent, ServerRemoved.class);
}
Also used : MessageCollectorActor(org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor) ActorRef(akka.actor.ActorRef) TestActorRef(akka.testkit.TestActorRef) ServerRemoved(org.opendaylight.controller.cluster.raft.messages.ServerRemoved) Test(org.junit.Test)

Aggregations

ActorRef (akka.actor.ActorRef)1 TestActorRef (akka.testkit.TestActorRef)1 Test (org.junit.Test)1 ServerRemoved (org.opendaylight.controller.cluster.raft.messages.ServerRemoved)1 MessageCollectorActor (org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor)1