use of com.hazelcast.client.test.executor.tasks.AppendCallable in project hazelcast by hazelcast.
the class ClientExecutorServiceInvokeTest method testInvokeAny.
@Test(expected = UnsupportedOperationException.class)
public void testInvokeAny() throws Throwable {
IExecutorService service = client.getExecutorService(randomString());
Collection<Callable<String>> collection = new ArrayList<Callable<String>>();
collection.add(new AppendCallable());
collection.add(new AppendCallable());
service.invokeAny(collection);
}
use of com.hazelcast.client.test.executor.tasks.AppendCallable in project hazelcast by hazelcast.
the class ClientExecutorServiceInvokeTest method testInvokeAnyTimeOut.
@Test(expected = UnsupportedOperationException.class)
public void testInvokeAnyTimeOut() throws Throwable {
IExecutorService service = client.getExecutorService(randomString());
Collection<Callable<String>> collection = new ArrayList<Callable<String>>();
collection.add(new AppendCallable());
collection.add(new AppendCallable());
service.invokeAny(collection, 1, TimeUnit.MINUTES);
}
use of com.hazelcast.client.test.executor.tasks.AppendCallable in project hazelcast by hazelcast.
the class ClientExecutorServiceInvokeTest method testInvokeAll.
@Test
public void testInvokeAll() throws Throwable {
IExecutorService service = client.getExecutorService(randomString());
String msg = randomString();
Collection<Callable<String>> collection = new ArrayList<Callable<String>>();
collection.add(new AppendCallable(msg));
collection.add(new AppendCallable(msg));
List<Future<String>> results = service.invokeAll(collection);
for (Future<String> result : results) {
assertEquals(msg + AppendCallable.APPENDAGE, result.get());
}
}
Aggregations