use of akka.testkit.TestProbe in project controller by opendaylight.
the class RemoteProxyTransactionTest method testForwardToRemoteCommit.
@Override
public void testForwardToRemoteCommit() throws Exception {
final TestProbe probe = createProbe();
final TransactionAbortRequest request = new TransactionAbortRequest(TRANSACTION_ID, 0L, probe.ref());
testForwardToRemote(request, TransactionAbortRequest.class);
}
use of akka.testkit.TestProbe in project controller by opendaylight.
the class SingleClientHistoryTest method setUp.
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
system = ActorSystem.apply();
final TestProbe clientContextProbe = new TestProbe(system, "client");
final TestProbe actorContextProbe = new TestProbe(system, "actor-context");
clientActorContext = AccessClientUtil.createClientActorContext(system, clientContextProbe.ref(), CLIENT_ID, PERSISTENCE_ID);
final ActorContext actorContextMock = createActorContextMock(system, actorContextProbe.ref());
behavior = new SimpleDataStoreClientBehavior(clientActorContext, actorContextMock, SHARD_NAME);
object = new SingleClientHistory(behavior, HISTORY_ID);
}
use of akka.testkit.TestProbe in project controller by opendaylight.
the class RoleChangeNotifierTest method checkListenerRoleChangeNotification.
private void checkListenerRoleChangeNotification(final RoleChanged roleChanged) {
for (final TestProbe listener : listeners) {
final RoleChangeNotification received = listener.expectMsgClass(RoleChangeNotification.class);
Assert.assertEquals(roleChanged.getMemberId(), received.getMemberId());
Assert.assertEquals(roleChanged.getOldRole(), received.getOldRole());
Assert.assertEquals(roleChanged.getNewRole(), received.getNewRole());
}
}
use of akka.testkit.TestProbe in project controller by opendaylight.
the class RoleChangeNotifierTest method registerListeners.
private void registerListeners() {
for (final TestProbe listener : listeners) {
notifier.tell(new RegisterRoleChangeListener(), listener.ref());
listener.expectMsgClass(RegisterRoleChangeListenerReply.class);
}
}
use of akka.testkit.TestProbe in project controller by opendaylight.
the class AbstractTransmitQueueTest method setUp.
@Before
public void setUp() throws Exception {
system = ActorSystem.apply();
probe = new TestProbe(system);
queue = createQueue();
}
Aggregations