executeOperationAsync(eq(actorSystem.actorSelection(actorRef.path())),
eqCreateTransaction(memberName, type));
- doReturn(false).when(mockActorContext).isLocalPath(actorRef.path().toString());
+ doReturn(false).when(mockActorContext).isPathLocal(actorRef.path().toString());
return actorRef;
}
}
}
- @SuppressWarnings("unchecked")
@Test
public void testReady() throws Exception {
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
verifyCohortFutures(proxy, getSystem().actorSelection(actorRef.path()));
}
- @SuppressWarnings("unchecked")
@Test
public void testReadyForwardCompatibility() throws Exception {
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE, 0);
eq(actorRef.path().toString()));
}
- @SuppressWarnings("unchecked")
@Test
public void testReadyWithRecordingOperationFailure() throws Exception {
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
doReturn(readySerializedTxReply(actorRef.path().toString())).when(mockActorContext).executeOperationAsync(
eq(actorSelection(actorRef)), isA(ReadyTransaction.SERIALIZABLE_CLASS));
- doReturn(false).when(mockActorContext).isLocalPath(actorRef.path().toString());
+ doReturn(false).when(mockActorContext).isPathLocal(actorRef.path().toString());
TransactionProxy transactionProxy = new TransactionProxy(mockActorContext,
WRITE_ONLY);
MergeDataReply.SERIALIZABLE_CLASS, TestException.class);
}
- @SuppressWarnings("unchecked")
@Test
public void testReadyWithReplyFailure() throws Exception {
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
verifyCohortFutures(proxy, PrimaryNotFoundException.class);
}
- @SuppressWarnings("unchecked")
@Test
public void testReadyWithInvalidReplyMessageType() throws Exception {
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
assertTrue("Invalid identifier: " + id, id.toString().startsWith(memberName));
}
- @SuppressWarnings("unchecked")
@Test
public void testClose() throws Exception{
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
executeOperationAsync(eq(actorSystem.actorSelection(shardActorRef.path())),
eqCreateTransaction(memberName, READ_ONLY));
- doReturn(true).when(mockActorContext).isLocalPath(actorPath);
+ doReturn(true).when(mockActorContext).isPathLocal(actorPath);
TransactionProxy transactionProxy = new TransactionProxy(mockActorContext,READ_ONLY);
executeOperationAsync(eq(actorSystem.actorSelection(shardActorRef.path())),
eqCreateTransaction(memberName, WRITE_ONLY));
- doReturn(true).when(mockActorContext).isLocalPath(actorPath);
+ doReturn(true).when(mockActorContext).isPathLocal(actorPath);
NormalizedNode<?, ?> nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME);