Search in sources :

Example 1 with MCPollMCEventsCodec

use of com.hazelcast.client.impl.protocol.codec.MCPollMCEventsCodec 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());
}
Also used : ClientDelegatingFuture(com.hazelcast.client.impl.ClientDelegatingFuture) ClientInvocation(com.hazelcast.client.impl.spi.impl.ClientInvocation) List(java.util.List) ArrayList(java.util.ArrayList) MCPollMCEventsCodec(com.hazelcast.client.impl.protocol.codec.MCPollMCEventsCodec) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

ClientDelegatingFuture (com.hazelcast.client.impl.ClientDelegatingFuture)1 MCPollMCEventsCodec (com.hazelcast.client.impl.protocol.codec.MCPollMCEventsCodec)1 ClientInvocation (com.hazelcast.client.impl.spi.impl.ClientInvocation)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Test (org.junit.Test)1