Search in sources :

Example 1 with SelectNoMembers

use of com.hazelcast.client.executor.tasks.SelectNoMembers in project hazelcast by hazelcast.

the class ClientExecutorServiceTest method testExecute_withNoMemberSelected.

@Test(expected = RejectedExecutionException.class)
public void testExecute_withNoMemberSelected() {
    IExecutorService service = client.getExecutorService(randomString());
    String mapName = randomString();
    MemberSelector selector = new SelectNoMembers();
    service.execute(new MapPutRunnable(mapName), selector);
}
Also used : SelectNoMembers(com.hazelcast.client.executor.tasks.SelectNoMembers) MemberSelector(com.hazelcast.core.MemberSelector) MapPutRunnable(com.hazelcast.client.executor.tasks.MapPutRunnable) IExecutorService(com.hazelcast.core.IExecutorService) HazelcastTestSupport.randomString(com.hazelcast.test.HazelcastTestSupport.randomString) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

MapPutRunnable (com.hazelcast.client.executor.tasks.MapPutRunnable)1 SelectNoMembers (com.hazelcast.client.executor.tasks.SelectNoMembers)1 IExecutorService (com.hazelcast.core.IExecutorService)1 MemberSelector (com.hazelcast.core.MemberSelector)1 HazelcastTestSupport.randomString (com.hazelcast.test.HazelcastTestSupport.randomString)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1