use of com.hazelcast.core.IndeterminateOperationStateException in project hazelcast by hazelcast.
the class IndeterminateOperationStateExceptionTest method partitionInvocation_shouldFailOnBackupTimeout_whenConfigurationEnabledGlobally.
@Test
public void partitionInvocation_shouldFailOnBackupTimeout_whenConfigurationEnabledGlobally() throws InterruptedException, TimeoutException {
setup(true);
dropOperationsBetween(instance1, instance2, F_ID, singletonList(SpiDataSerializerHook.BACKUP));
int partitionId = getPartitionId(instance1);
OperationServiceImpl operationService = getNodeEngineImpl(instance1).getOperationService();
InternalCompletableFuture<Object> future = operationService.createInvocationBuilder(InternalPartitionService.SERVICE_NAME, new PrimaryOperation(), partitionId).invoke();
try {
future.get(2, TimeUnit.MINUTES);
fail();
} catch (ExecutionException e) {
assertTrue(e.getCause() instanceof IndeterminateOperationStateException);
}
}
Aggregations