Search in sources :

Example 21 with DurableExecutorService

use of com.hazelcast.durableexecutor.DurableExecutorService 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);
}
Also used : DurableExecutorService(com.hazelcast.durableexecutor.DurableExecutorService) BasicTestCallable(com.hazelcast.executor.ExecutorServiceTestSupport.BasicTestCallable) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 22 with DurableExecutorService

use of com.hazelcast.durableexecutor.DurableExecutorService in project hazelcast by hazelcast.

the class ClientDurableExecutorServiceTest method testSubmitFailingCallableException.

@Test
public void testSubmitFailingCallableException() throws Exception {
    DurableExecutorService service = client.getDurableExecutorService(randomString());
    Future<String> failingFuture = service.submit(new FailingCallable());
    expectedException.expect(ExecutionException.class);
    failingFuture.get();
}
Also used : DurableExecutorService(com.hazelcast.durableexecutor.DurableExecutorService) HazelcastTestSupport.randomString(com.hazelcast.test.HazelcastTestSupport.randomString) FailingCallable(com.hazelcast.client.executor.tasks.FailingCallable) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 23 with DurableExecutorService

use of com.hazelcast.durableexecutor.DurableExecutorService in project hazelcast by hazelcast.

the class ClientDurableExecutorServiceTest method testAwaitTermination.

@Test
public void testAwaitTermination() throws Exception {
    DurableExecutorService service = client.getDurableExecutorService(randomString());
    assertFalse(service.awaitTermination(1, TimeUnit.SECONDS));
}
Also used : DurableExecutorService(com.hazelcast.durableexecutor.DurableExecutorService) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 24 with DurableExecutorService

use of com.hazelcast.durableexecutor.DurableExecutorService 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);
}
Also used : DurableExecutorService(com.hazelcast.durableexecutor.DurableExecutorService) BasicTestCallable(com.hazelcast.executor.ExecutorServiceTestSupport.BasicTestCallable) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 25 with DurableExecutorService

use of com.hazelcast.durableexecutor.DurableExecutorService 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);
}
Also used : DurableExecutorService(com.hazelcast.durableexecutor.DurableExecutorService) BasicTestCallable(com.hazelcast.executor.ExecutorServiceTestSupport.BasicTestCallable) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

DurableExecutorService (com.hazelcast.durableexecutor.DurableExecutorService)41 ParallelTest (com.hazelcast.test.annotation.ParallelTest)39 QuickTest (com.hazelcast.test.annotation.QuickTest)39 Test (org.junit.Test)39 HazelcastTestSupport.randomString (com.hazelcast.test.HazelcastTestSupport.randomString)28 IMap (com.hazelcast.core.IMap)11 MapPutRunnable (com.hazelcast.client.executor.tasks.MapPutRunnable)10 BasicTestCallable (com.hazelcast.executor.ExecutorServiceTestSupport.BasicTestCallable)9 CountDownLatch (java.util.concurrent.CountDownLatch)9 SleepingTask (com.hazelcast.executor.ExecutorServiceTestSupport.SleepingTask)7 MapPutPartitionAwareRunnable (com.hazelcast.client.executor.tasks.MapPutPartitionAwareRunnable)6 Member (com.hazelcast.core.Member)6 AppendCallable (com.hazelcast.client.executor.tasks.AppendCallable)5 AssertTask (com.hazelcast.test.AssertTask)5 Future (java.util.concurrent.Future)5 RejectedExecutionException (java.util.concurrent.RejectedExecutionException)5 MapPutPartitionAwareCallable (com.hazelcast.client.executor.tasks.MapPutPartitionAwareCallable)4 ExecutionException (java.util.concurrent.ExecutionException)4 FailingCallable (com.hazelcast.client.executor.tasks.FailingCallable)3 ExecutionCallback (com.hazelcast.core.ExecutionCallback)3