Search in sources :

Example 1 with MCGetSystemPropertiesCodec

use of com.hazelcast.client.impl.protocol.codec.MCGetSystemPropertiesCodec in project hazelcast by hazelcast.

the class MCTrustedInterfacesTest method testGetSystemPropertiesMessageTask_passing.

@Test
public void testGetSystemPropertiesMessageTask_passing() throws Exception {
    HazelcastInstance client = factory.newHazelcastClient(new ClientConfig(), "222.222.222.222");
    HazelcastClientInstanceImpl clientImpl = ((HazelcastClientProxy) client).client;
    ClientInvocation invocation = new ClientInvocation(clientImpl, MCGetSystemPropertiesCodec.encodeRequest(), null);
    ClientDelegatingFuture<List<Map.Entry<String, String>>> future = new ClientDelegatingFuture<>(invocation.invoke(), clientImpl.getSerializationService(), MCGetSystemPropertiesCodec::decodeResponse);
    assertFalse(future.get(ASSERT_TRUE_EVENTUALLY_TIMEOUT, SECONDS).isEmpty());
}
Also used : MCGetSystemPropertiesCodec(com.hazelcast.client.impl.protocol.codec.MCGetSystemPropertiesCodec) ClientDelegatingFuture(com.hazelcast.client.impl.ClientDelegatingFuture) HazelcastInstance(com.hazelcast.core.HazelcastInstance) HazelcastClientInstanceImpl(com.hazelcast.client.impl.clientside.HazelcastClientInstanceImpl) ClientInvocation(com.hazelcast.client.impl.spi.impl.ClientInvocation) List(java.util.List) ArrayList(java.util.ArrayList) ClientConfig(com.hazelcast.client.config.ClientConfig) HazelcastClientProxy(com.hazelcast.client.impl.clientside.HazelcastClientProxy) Map(java.util.Map) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 2 with MCGetSystemPropertiesCodec

use of com.hazelcast.client.impl.protocol.codec.MCGetSystemPropertiesCodec in project hazelcast by hazelcast.

the class MCMessageTasksTest method testGetSystemPropertiesMessageTask.

@Test
public void testGetSystemPropertiesMessageTask() throws Exception {
    ClientInvocation invocation = new ClientInvocation(getClientImpl(), MCGetSystemPropertiesCodec.encodeRequest(), null);
    ClientDelegatingFuture<List<Entry<String, String>>> future = new ClientDelegatingFuture<>(invocation.invoke(), getClientImpl().getSerializationService(), MCGetSystemPropertiesCodec::decodeResponse);
    assertFalse(future.get(ASSERT_TRUE_EVENTUALLY_TIMEOUT, SECONDS).isEmpty());
}
Also used : MCGetSystemPropertiesCodec(com.hazelcast.client.impl.protocol.codec.MCGetSystemPropertiesCodec) ClientDelegatingFuture(com.hazelcast.client.impl.ClientDelegatingFuture) ClientInvocation(com.hazelcast.client.impl.spi.impl.ClientInvocation) List(java.util.List) ArrayList(java.util.ArrayList) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

ClientDelegatingFuture (com.hazelcast.client.impl.ClientDelegatingFuture)2 MCGetSystemPropertiesCodec (com.hazelcast.client.impl.protocol.codec.MCGetSystemPropertiesCodec)2 ClientInvocation (com.hazelcast.client.impl.spi.impl.ClientInvocation)2 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)2 QuickTest (com.hazelcast.test.annotation.QuickTest)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Test (org.junit.Test)2 ClientConfig (com.hazelcast.client.config.ClientConfig)1 HazelcastClientInstanceImpl (com.hazelcast.client.impl.clientside.HazelcastClientInstanceImpl)1 HazelcastClientProxy (com.hazelcast.client.impl.clientside.HazelcastClientProxy)1 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 Map (java.util.Map)1