Search in sources :

Example 56 with ClientConfig

use of com.hazelcast.client.config.ClientConfig in project hazelcast by hazelcast.

the class AbstractListenersOnReconnectTest method getNonSmartClientConfig.

private ClientConfig getNonSmartClientConfig(int heartbeatTimeoutSeconds, int heartbeatIntervalSeconds) {
    ClientConfig clientConfig = getSmartClientConfig(heartbeatTimeoutSeconds, heartbeatIntervalSeconds);
    clientConfig.getNetworkConfig().setSmartRouting(false);
    return clientConfig;
}
Also used : ClientConfig(com.hazelcast.client.config.ClientConfig)

Example 57 with ClientConfig

use of com.hazelcast.client.config.ClientConfig in project hazelcast by hazelcast.

the class ListenerLeakTestNonSmartRouting method newHazelcastClient.

private HazelcastInstance newHazelcastClient() {
    ClientConfig clientConfig = new ClientConfig();
    clientConfig.getNetworkConfig().setSmartRouting(false);
    return hazelcastFactory.newHazelcastClient(clientConfig);
}
Also used : ClientConfig(com.hazelcast.client.config.ClientConfig)

Example 58 with ClientConfig

use of com.hazelcast.client.config.ClientConfig in project hazelcast by hazelcast.

the class AbstractListenersOnReconnectTest method getSmartClientConfig.

private ClientConfig getSmartClientConfig() {
    ClientConfig clientConfig = new ClientConfig();
    clientConfig.getNetworkConfig().setConnectionAttemptLimit(Integer.MAX_VALUE);
    clientConfig.getNetworkConfig().setRedoOperation(true);
    return clientConfig;
}
Also used : ClientConfig(com.hazelcast.client.config.ClientConfig)

Example 59 with ClientConfig

use of com.hazelcast.client.config.ClientConfig in project hazelcast by hazelcast.

the class AbstractListenersOnReconnectTest method testTemporaryBlockedNoDisconnectionNonSmartRouting.

@Test
public void testTemporaryBlockedNoDisconnectionNonSmartRouting() {
    factory.newHazelcastInstance();
    ClientConfig clientConfig = getNonSmartClientConfig(4, 1);
    client = factory.newHazelcastClient(clientConfig);
    testListenersTemporaryNetworkBlockage();
}
Also used : ClientConfig(com.hazelcast.client.config.ClientConfig) Test(org.junit.Test)

Example 60 with ClientConfig

use of com.hazelcast.client.config.ClientConfig in project hazelcast by hazelcast.

the class AbstractListenersOnReconnectTest method testListenersNonSmartRoutingMultipleServer.

@Test
public void testListenersNonSmartRoutingMultipleServer() {
    factory.newInstances(null, 3);
    ClientConfig clientConfig = getNonSmartClientConfig();
    client = factory.newHazelcastClient(clientConfig);
    testListenersTerminateOwnerNode();
}
Also used : ClientConfig(com.hazelcast.client.config.ClientConfig) Test(org.junit.Test)

Aggregations

ClientConfig (com.hazelcast.client.config.ClientConfig)214 Test (org.junit.Test)129 HazelcastInstance (com.hazelcast.core.HazelcastInstance)110 QuickTest (com.hazelcast.test.annotation.QuickTest)107 ParallelTest (com.hazelcast.test.annotation.ParallelTest)81 Config (com.hazelcast.config.Config)45 NearCacheConfig (com.hazelcast.config.NearCacheConfig)32 NightlyTest (com.hazelcast.test.annotation.NightlyTest)32 CountDownLatch (java.util.concurrent.CountDownLatch)25 AssertTask (com.hazelcast.test.AssertTask)20 Before (org.junit.Before)20 HazelcastClientProxy (com.hazelcast.client.impl.HazelcastClientProxy)16 ClientNetworkConfig (com.hazelcast.client.config.ClientNetworkConfig)15 HazelcastClientCachingProvider (com.hazelcast.client.cache.impl.HazelcastClientCachingProvider)13 CachingProvider (javax.cache.spi.CachingProvider)13 IMap (com.hazelcast.core.IMap)12 LifecycleListener (com.hazelcast.core.LifecycleListener)12 LifecycleEvent (com.hazelcast.core.LifecycleEvent)11 Data (com.hazelcast.nio.serialization.Data)11 NearCacheManager (com.hazelcast.internal.nearcache.NearCacheManager)10