Search in sources :

Example 6 with TestHazelcastFactory

use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.

the class ClientCacheThroughHazelcastInstanceTest method createInstance.

@Override
protected HazelcastInstance createInstance() {
    if (instanceFactory != null) {
        throw new IllegalStateException("There should not be multiple creation of TestHazelcastFactory!");
    }
    instanceFactory = new TestHazelcastFactory();
    ownerInstance = instanceFactory.newHazelcastInstance();
    return instanceFactory.newHazelcastClient();
}
Also used : TestHazelcastFactory(com.hazelcast.client.test.TestHazelcastFactory)

Example 7 with TestHazelcastFactory

use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.

the class ClientCachePartitionIteratorTest method setup.

@Before
public void setup() {
    factory = new TestHazelcastFactory();
    server = factory.newHazelcastInstance();
    HazelcastInstance client = factory.newHazelcastClient();
    cachingProvider = HazelcastClientCachingProvider.createCachingProvider(client);
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) TestHazelcastFactory(com.hazelcast.client.test.TestHazelcastFactory) Before(org.junit.Before)

Example 8 with TestHazelcastFactory

use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.

the class ClientCacheReadWriteThroughTest method getInstance.

protected HazelcastInstance getInstance() {
    // Create server instance
    HazelcastInstance serverInstance = factory.newHazelcastInstance(createConfig());
    serverCachingProvider = HazelcastServerCachingProvider.createCachingProvider(serverInstance);
    // Create client instance
    return ((TestHazelcastFactory) factory).newHazelcastClient();
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) TestHazelcastFactory(com.hazelcast.client.test.TestHazelcastFactory)

Example 9 with TestHazelcastFactory

use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.

the class DummyClientCachePartitionIteratorTest method setup.

@Before
public void setup() {
    factory = new TestHazelcastFactory();
    Config config = getConfig();
    server = factory.newHazelcastInstance(config);
    factory.newHazelcastInstance(config);
    HazelcastInstance client = factory.newHazelcastClient(getClientConfig(server));
    cachingProvider = HazelcastClientCachingProvider.createCachingProvider(client);
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) Config(com.hazelcast.config.Config) ClientConfig(com.hazelcast.client.config.ClientConfig) ClientNetworkConfig(com.hazelcast.client.config.ClientNetworkConfig) TestHazelcastFactory(com.hazelcast.client.test.TestHazelcastFactory) Before(org.junit.Before)

Example 10 with TestHazelcastFactory

use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.

the class CallbackAwareClientDelegatingFutureTest method setup.

@Before
public void setup() {
    factory = new TestHazelcastFactory();
    factory.newHazelcastInstance();
    client = ((HazelcastClientProxy) factory.newHazelcastClient()).client;
}
Also used : TestHazelcastFactory(com.hazelcast.client.test.TestHazelcastFactory) Before(org.junit.Before)

Aggregations

TestHazelcastFactory (com.hazelcast.client.test.TestHazelcastFactory)48 Before (org.junit.Before)30 Config (com.hazelcast.config.Config)24 HazelcastInstance (com.hazelcast.core.HazelcastInstance)18 ClientConfig (com.hazelcast.client.config.ClientConfig)12 MapConfig (com.hazelcast.config.MapConfig)9 QuorumConfig (com.hazelcast.config.QuorumConfig)7 PartitionedCluster (com.hazelcast.quorum.PartitionedCluster)7 BeforeClass (org.junit.BeforeClass)7 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)3 NearCacheConfig (com.hazelcast.config.NearCacheConfig)3 HazelcastClientCacheManager (com.hazelcast.client.cache.impl.HazelcastClientCacheManager)2 HazelcastClientCachingProvider (com.hazelcast.client.cache.impl.HazelcastClientCachingProvider)2 ClientNetworkConfig (com.hazelcast.client.config.ClientNetworkConfig)2 MapStoreConfig (com.hazelcast.config.MapStoreConfig)2 QueryCacheConfig (com.hazelcast.config.QueryCacheConfig)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 CachingProvider (javax.cache.spi.CachingProvider)2 HazelcastServerCacheManager (com.hazelcast.cache.impl.HazelcastServerCacheManager)1