use of com.hazelcast.executor.ExecutorServiceTestSupport.BasicTestCallable in project hazelcast by hazelcast.
the class ClientDurableExecutorServiceTest method testInvokeAll.
@Test
public void testInvokeAll() throws Exception {
DurableExecutorService service = client.getDurableExecutorService(randomString());
List<BasicTestCallable> callables = Collections.emptyList();
expectedException.expect(UnsupportedOperationException.class);
service.invokeAll(callables);
}
use of com.hazelcast.executor.ExecutorServiceTestSupport.BasicTestCallable in project hazelcast by hazelcast.
the class ClientDurableExecutorServiceTest method testInvokeAny_WithTimeout.
@Test
public void testInvokeAny_WithTimeout() throws Exception {
DurableExecutorService service = client.getDurableExecutorService(randomString());
List<BasicTestCallable> callables = Collections.emptyList();
expectedException.expect(UnsupportedOperationException.class);
service.invokeAny(callables, 1, TimeUnit.SECONDS);
}
use of com.hazelcast.executor.ExecutorServiceTestSupport.BasicTestCallable in project hazelcast by hazelcast.
the class ClientDurableExecutorServiceTest method testInvokeAny.
@Test
public void testInvokeAny() throws Exception {
DurableExecutorService service = client.getDurableExecutorService(randomString());
List<BasicTestCallable> callables = Collections.emptyList();
expectedException.expect(UnsupportedOperationException.class);
service.invokeAny(callables);
}
use of com.hazelcast.executor.ExecutorServiceTestSupport.BasicTestCallable in project hazelcast by hazelcast.
the class ClientDurableExecutorServiceTest method test_whenRingBufferIsFull_thenThrowRejectedExecutionException.
@Test
public void test_whenRingBufferIsFull_thenThrowRejectedExecutionException() throws Exception {
String key = randomString();
DurableExecutorService service = client.getDurableExecutorService(SINGLE_TASK + randomString());
service.submitToKeyOwner(new SleepingTask(100), key);
DurableExecutorServiceFuture<String> future = service.submitToKeyOwner(new BasicTestCallable(), key);
expectedException.expect(new RootCauseMatcher(RejectedExecutionException.class));
future.get();
}
Aggregations