use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class ClientCacheHazelcastInstanceAwareTest method createInstance.
@Override
protected HazelcastInstance createInstance() {
if (instanceFactory != null) {
throw new IllegalStateException("There should not be multiple creation of TestHazelcastFactory!");
}
instanceFactory = new TestHazelcastFactory();
Config config = createConfig();
instanceFactory.newHazelcastInstance(config);
return instanceFactory.newHazelcastClient();
}
use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class MultiMapAggregationLiteMemberTest method before.
@Before
public void before() {
factory = new TestHazelcastFactory();
final HazelcastInstance lite = factory.newHazelcastInstance(new Config().setLiteMember(true));
final HazelcastInstance instance1 = factory.newHazelcastInstance();
final HazelcastInstance instance2 = factory.newHazelcastInstance();
assertClusterSizeEventually(3, lite);
assertClusterSizeEventually(3, instance1);
assertClusterSizeEventually(3, instance2);
client = factory.newHazelcastClient();
}
use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class MapNearCacheInvalidationFromClientTest method init.
@Before
public void init() {
mapName = randomMapName();
factory = new TestHazelcastFactory();
factory.newHazelcastInstance(createServerConfig(mapName, false));
lite = factory.newHazelcastInstance(createServerConfig(mapName, true));
client = factory.newHazelcastClient();
}
use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class ClientQueryCacheBasicTest method setup.
// setup a map with 2 query caches, same predicate, one includes values, the other excludes values
@Before
public void setup() {
Config config = new Config();
ClientConfig clientConfig = new ClientConfig();
clientConfig.addQueryCacheConfig(TEST_MAP_NAME, new QueryCacheConfig(QUERY_CACHE_NAME).setPredicateConfig(new PredicateConfig(predicate)).setIncludeValue(includeValues));
if (useNearCache) {
clientConfig.addNearCacheConfig(new NearCacheConfig().setName(TEST_MAP_NAME).setInvalidateOnChange(true));
}
clientConfig.setProperty(MapEventPublisherImpl.LISTENER_WITH_PREDICATE_PRODUCES_NATURAL_EVENT_TYPES.getName(), Boolean.toString(useQueryCacheNaturalFilteringStrategy));
factory = new TestHazelcastFactory();
factory.newHazelcastInstance(config);
HazelcastInstance client = factory.newHazelcastClient(clientConfig);
map = client.getMap(TEST_MAP_NAME);
queryCache = map.getQueryCache(QUERY_CACHE_NAME);
}
use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class ClientClusterServiceMemberListTest method before.
@Before
public void before() {
factory = new TestHazelcastFactory();
liteInstance = factory.newHazelcastInstance(liteConfig);
dataInstance = factory.newHazelcastInstance();
dataInstance2 = factory.newHazelcastInstance();
client = factory.newHazelcastClient();
}
Aggregations