use of com.hazelcast.spi.exception.RetryableHazelcastException in project hazelcast by hazelcast.
the class ParallelPartitionScanExecutorTest method execute_fail_retryable.
@Test
public void execute_fail_retryable() {
PartitionScanRunner runner = mock(PartitionScanRunner.class);
ParallelPartitionScanExecutor executor = executor(runner);
Predicate predicate = Predicates.equal("attribute", 1);
QueryResult queryResult = new QueryResult(IterationType.ENTRY, null, null, Long.MAX_VALUE, false);
doThrow(new RetryableHazelcastException()).when(runner).run(anyString(), eq(predicate), anyInt(), isA(QueryResult.class));
expected.expect(RetryableHazelcastException.class);
executor.execute("Map", predicate, asList(1, 2, 3), queryResult);
}
use of com.hazelcast.spi.exception.RetryableHazelcastException in project hazelcast by hazelcast.
the class CallerRunsPartitionScanExecutorTest method execute_fail_retryable.
@Test
public void execute_fail_retryable() {
PartitionScanRunner runner = mock(PartitionScanRunner.class);
CallerRunsPartitionScanExecutor executor = new CallerRunsPartitionScanExecutor(runner);
Predicate predicate = Predicates.equal("attribute", 1);
QueryResult queryResult = new QueryResult(IterationType.ENTRY, null, null, Long.MAX_VALUE, false);
doThrow(new RetryableHazelcastException()).when(runner).run(anyString(), eq(predicate), anyInt(), eq(queryResult));
expected.expect(RetryableHazelcastException.class);
executor.execute("Map", predicate, asList(1, 2, 3), queryResult);
}
Aggregations