Search in sources :

Example 1 with ClientClasspathXmlConfig

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

the class ClientDiscoverySpiTest method testMulticastDiscoveryEnabledNoLocalhost.

@Test(expected = IllegalStateException.class)
public void testMulticastDiscoveryEnabledNoLocalhost() {
    Hazelcast.newHazelcastInstance();
    ClientClasspathXmlConfig clientConfig = new ClientClasspathXmlConfig("hazelcast-client-dummy-multicast-discovery-test.xml");
    HazelcastClient.newHazelcastClient(clientConfig);
}
Also used : ClientClasspathXmlConfig(com.hazelcast.client.config.ClientClasspathXmlConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) SlowTest(com.hazelcast.test.annotation.SlowTest)

Example 2 with ClientClasspathXmlConfig

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

the class ConfiguredBehaviourTestXmlConfig method testReconnectModeASYNCSingleMemberStartLateXmlConfig.

@Test
public void testReconnectModeASYNCSingleMemberStartLateXmlConfig() {
    HazelcastInstance hazelcastInstance = hazelcastFactory.newHazelcastInstance();
    ClientClasspathXmlConfig clientConfig = new ClientClasspathXmlConfig("hazelcast-client-connection-strategy-asyncReconnect.xml");
    HazelcastInstance client = hazelcastFactory.newHazelcastClient(clientConfig);
    assertTrue(client.getLifecycleService().isRunning());
    ReconnectListener reconnectListener = new ReconnectListener();
    client.getLifecycleService().addLifecycleListener(reconnectListener);
    hazelcastInstance.shutdown();
    hazelcastFactory.newHazelcastInstance();
    assertOpenEventually(reconnectListener.reconnectedLatch);
    client.getMap(randomMapName());
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) ClientClasspathXmlConfig(com.hazelcast.client.config.ClientClasspathXmlConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 3 with ClientClasspathXmlConfig

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

the class ConfiguredBehaviourTestXmlConfig method testAsyncStartTrueXmlConfig.

@Test
public void testAsyncStartTrueXmlConfig() {
    ClientClasspathXmlConfig clientConfig = new ClientClasspathXmlConfig("hazelcast-client-connection-strategy-asyncStart-true.xml");
    HazelcastInstance client = hazelcastFactory.newHazelcastClient(clientConfig);
    assertTrue(client.getLifecycleService().isRunning());
    hazelcastFactory.newHazelcastInstance();
    assertOpenEventually(asyncStartFromXmlLatch);
    client.getMap(randomMapName());
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) ClientClasspathXmlConfig(com.hazelcast.client.config.ClientClasspathXmlConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

ClientClasspathXmlConfig (com.hazelcast.client.config.ClientClasspathXmlConfig)3 QuickTest (com.hazelcast.test.annotation.QuickTest)3 Test (org.junit.Test)3 HazelcastInstance (com.hazelcast.core.HazelcastInstance)2 SlowTest (com.hazelcast.test.annotation.SlowTest)1