}
interface Invoker {
- FluentFuture<?> invoke(TransactionProxy proxy) throws Exception;
+ FluentFuture<?> invoke(TransactionProxy proxy);
}
@Test
}
@Test
- public void testWrite() throws Exception {
+ public void testWrite() {
dataStoreContextBuilder.shardBatchedModificationCount(1);
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
}
@Test
- public void testMerge() throws Exception {
+ public void testMerge() {
dataStoreContextBuilder.shardBatchedModificationCount(1);
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
}
@Test
- public void testDelete() throws Exception {
+ public void testDelete() {
dataStoreContextBuilder.shardBatchedModificationCount(1);
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
}
@Test
- public void testReadWrite() throws Exception {
+ public void testReadWrite() {
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
final NormalizedNode<?, ?> nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
}
@Test
- public void testReadyWithReadWrite() throws Exception {
+ public void testReadyWithReadWrite() {
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
final NormalizedNode<?, ?> nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
}
@Test
- public void testReadyWithNoModifications() throws Exception {
+ public void testReadyWithNoModifications() {
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
doReturn(readDataReply(null)).when(mockActorContext).executeOperationAsync(
}
@Test
- public void testReadyWithMultipleShardWrites() throws Exception {
+ public void testReadyWithMultipleShardWrites() {
ActorRef actorRef1 = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
ActorRef actorRef2 = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY,
}
@Test
- public void testReadyWithWriteOnlyAndLastBatchPending() throws Exception {
+ public void testReadyWithWriteOnlyAndLastBatchPending() {
dataStoreContextBuilder.writeOnlyTransactionOptimizationsEnabled(true);
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
}
@Test
- public void testReadyWithWriteOnlyAndLastBatchEmpty() throws Exception {
+ public void testReadyWithWriteOnlyAndLastBatchEmpty() {
dataStoreContextBuilder.shardBatchedModificationCount(1).writeOnlyTransactionOptimizationsEnabled(true);
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
}
@Test
- public void testReadyWithReplyFailure() throws Exception {
+ public void testReadyWithReplyFailure() {
dataStoreContextBuilder.writeOnlyTransactionOptimizationsEnabled(true);
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
}
@Test
- public void testReadyWithDebugContextEnabled() throws Exception {
+ public void testReadyWithDebugContextEnabled() {
dataStoreContextBuilder.transactionDebugContextEnabled(true);
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
}
@Test
- public void testReadyWithLocalTransaction() throws Exception {
+ public void testReadyWithLocalTransaction() {
ActorRef shardActorRef = getSystem().actorOf(Props.create(DoNothingActor.class));
doReturn(getSystem().actorSelection(shardActorRef.path())).when(mockActorContext)
}
@Test
- public void testReadyWithLocalTransactionWithFailure() throws Exception {
+ public void testReadyWithLocalTransactionWithFailure() {
ActorRef shardActorRef = getSystem().actorOf(Props.create(DoNothingActor.class));
doReturn(getSystem().actorSelection(shardActorRef.path())).when(mockActorContext)
verifyCohortFutures((SingleCommitCohortProxy)ready, RuntimeException.class);
}
- private void testWriteOnlyTxWithFindPrimaryShardFailure(final Exception toThrow) throws Exception {
+ private void testWriteOnlyTxWithFindPrimaryShardFailure(final Exception toThrow) {
doReturn(Futures.failed(toThrow)).when(mockActorContext).findPrimaryShardAsync(anyString());
TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, WRITE_ONLY);
}
@Test
- public void testWriteOnlyTxWithPrimaryNotFoundException() throws Exception {
+ public void testWriteOnlyTxWithPrimaryNotFoundException() {
testWriteOnlyTxWithFindPrimaryShardFailure(new PrimaryNotFoundException("mock"));
}
@Test
- public void testWriteOnlyTxWithNotInitializedException() throws Exception {
+ public void testWriteOnlyTxWithNotInitializedException() {
testWriteOnlyTxWithFindPrimaryShardFailure(new NotInitializedException("mock"));
}
@Test
- public void testWriteOnlyTxWithNoShardLeaderException() throws Exception {
+ public void testWriteOnlyTxWithNoShardLeaderException() {
testWriteOnlyTxWithFindPrimaryShardFailure(new NoShardLeaderException("mock"));
}
@Test
- public void testReadyWithInvalidReplyMessageType() throws Exception {
+ public void testReadyWithInvalidReplyMessageType() {
dataStoreContextBuilder.writeOnlyTransactionOptimizationsEnabled(true);
ActorRef actorRef1 = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
}
@Test
- public void testClose() throws Exception {
+ public void testClose() {
ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
doReturn(readDataReply(null)).when(mockActorContext).executeOperationAsync(
.getOperationTimeoutInMillis()) * 2);
}
- private void testModificationOperationBatching(final TransactionType type) throws Exception {
+ private void testModificationOperationBatching(final TransactionType type) {
int shardBatchedModificationCount = 3;
dataStoreContextBuilder.shardBatchedModificationCount(shardBatchedModificationCount);
}
@Test
- public void testReadWriteModificationOperationBatching() throws Exception {
+ public void testReadWriteModificationOperationBatching() {
testModificationOperationBatching(READ_WRITE);
}
@Test
- public void testWriteOnlyModificationOperationBatching() throws Exception {
+ public void testWriteOnlyModificationOperationBatching() {
testModificationOperationBatching(WRITE_ONLY);
}
@Test
- public void testOptimizedWriteOnlyModificationOperationBatching() throws Exception {
+ public void testOptimizedWriteOnlyModificationOperationBatching() {
dataStoreContextBuilder.writeOnlyTransactionOptimizationsEnabled(true);
testModificationOperationBatching(WRITE_ONLY);
}
}
@Test
- public void testReadRoot() throws ReadFailedException, InterruptedException, ExecutionException,
+ public void testReadRoot() throws InterruptedException, ExecutionException,
java.util.concurrent.TimeoutException {
SchemaContext schemaContext = SchemaContextHelper.full();
Configuration configuration = mock(Configuration.class);