use of com.hazelcast.client.impl.spi.impl.ClientInvocation in project hazelcast by hazelcast.
the class MCMessageTasksTest method testUpdateMapConfigMessageTask.
@Test
public void testUpdateMapConfigMessageTask() throws Exception {
ClientInvocation invocation = new ClientInvocation(getClientImpl(), MCUpdateMapConfigCodec.encodeRequest(randomString(), 100, 200, 0, false, 100, 0), null);
ClientDelegatingFuture<Void> future = new ClientDelegatingFuture<>(invocation.invoke(), getClientImpl().getSerializationService(), clientMessage -> null);
future.get(ASSERT_TRUE_EVENTUALLY_TIMEOUT, SECONDS);
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocation in project hazelcast by hazelcast.
the class MCMessageTasksTest method testRunGCMessageTask.
@Test
public void testRunGCMessageTask() throws Exception {
ClientInvocation invocation = new ClientInvocation(getClientImpl(), MCRunGcCodec.encodeRequest(), null);
ClientDelegatingFuture<Void> future = new ClientDelegatingFuture<>(invocation.invoke(), getClientImpl().getSerializationService(), clientMessage -> null);
future.get(ASSERT_TRUE_EVENTUALLY_TIMEOUT, SECONDS);
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocation in project hazelcast by hazelcast.
the class MCMessageTasksTest method testShutdownMemberMessageTask.
@Test
public void testShutdownMemberMessageTask() {
ClientInvocation invocation = new ClientInvocation(getClientImpl(), MCShutdownMemberCodec.encodeRequest(), null);
invocation.invoke();
assertTrueEventually(() -> assertFalse(member.getLifecycleService().isRunning()));
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocation in project hazelcast by hazelcast.
the class MCMessageTasksTest method testPollMCEventsMessageTask.
@Test
public void testPollMCEventsMessageTask() throws Exception {
ClientInvocation invocation = new ClientInvocation(getClientImpl(), MCPollMCEventsCodec.encodeRequest(), null);
ClientDelegatingFuture<List<MCEventDTO>> future = new ClientDelegatingFuture<>(invocation.invoke(), getClientImpl().getSerializationService(), MCPollMCEventsCodec::decodeResponse);
assertTrue(future.get(ASSERT_TRUE_EVENTUALLY_TIMEOUT, SECONDS).isEmpty());
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocation in project hazelcast by hazelcast.
the class MCMessageTasksTest method testGetTimedMemberStateMessageTask.
@Test
public void testGetTimedMemberStateMessageTask() throws Exception {
ClientInvocation invocation = new ClientInvocation(getClientImpl(), MCGetTimedMemberStateCodec.encodeRequest(), null);
ClientDelegatingFuture<String> future = new ClientDelegatingFuture<>(invocation.invoke(), getClientImpl().getSerializationService(), MCGetTimedMemberStateCodec::decodeResponse);
assertFalse(isNullOrEmptyAfterTrim(future.get(ASSERT_TRUE_EVENTUALLY_TIMEOUT, SECONDS)));
}
Aggregations