use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class ClientClusterProxyTest method client.
private HazelcastInstance client() {
factory = new TestHazelcastFactory();
Config config = new Config();
String groupAName = "HZ:GROUP";
config.getGroupConfig().setName(groupAName);
factory.newHazelcastInstance(config);
ClientConfig clientConfig = new ClientConfig();
clientConfig.setGroupConfig(new GroupConfig(config.getGroupConfig().getName()));
return factory.newHazelcastClient(clientConfig);
}
use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class ClientCacheReadQuorumTest method initialize.
@BeforeClass
public static void initialize() throws Exception {
QuorumConfig quorumConfig = new QuorumConfig();
quorumConfig.setName(QUORUM_ID);
quorumConfig.setType(QuorumType.READ);
quorumConfig.setEnabled(true);
quorumConfig.setSize(3);
CacheSimpleConfig cacheConfig = new CacheSimpleConfig();
cacheConfig.setName(CACHE_NAME_PREFIX + "*");
cacheConfig.setQuorumName(QUORUM_ID);
factory = new TestHazelcastFactory();
cluster = new PartitionedCluster(factory).createFiveMemberCluster(cacheConfig, quorumConfig);
initializeClients();
initializeCaches();
cluster.splitFiveMembersThreeAndTwo();
verifyClients();
}
use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class ClientCacheReadWriteQuorumTest method initialize.
@BeforeClass
public static void initialize() throws Exception {
QuorumConfig quorumConfig = new QuorumConfig();
quorumConfig.setName(QUORUM_ID);
quorumConfig.setType(QuorumType.READ_WRITE);
quorumConfig.setEnabled(true);
quorumConfig.setSize(3);
CacheSimpleConfig cacheConfig = new CacheSimpleConfig();
cacheConfig.setName(CACHE_NAME_PREFIX + "*");
cacheConfig.setQuorumName(QUORUM_ID);
factory = new TestHazelcastFactory();
cluster = new PartitionedCluster(factory).createFiveMemberCluster(cacheConfig, quorumConfig);
initializeClients();
initializeCaches();
cluster.splitFiveMembersThreeAndTwo();
verifyClients();
}
use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class ClientMapWriteQuorumTest method initialize.
@BeforeClass
public static void initialize() throws Exception {
QuorumConfig quorumConfig = new QuorumConfig();
quorumConfig.setName(QUORUM_ID);
quorumConfig.setEnabled(true);
quorumConfig.setSize(3);
quorumConfig.setType(QuorumType.WRITE);
MapConfig mapConfig = new MapConfig(MAP_NAME_PREFIX + "*");
mapConfig.setQuorumName(QUORUM_ID);
factory = new TestHazelcastFactory();
cluster = new PartitionedCluster(factory).partitionFiveMembersThreeAndTwo(mapConfig, quorumConfig);
initializeClients();
verifyClients();
}
use of com.hazelcast.client.test.TestHazelcastFactory in project hazelcast by hazelcast.
the class ClientLoggingServiceTest method setUp.
@Before
public void setUp() {
factory = new TestHazelcastFactory();
HazelcastInstance member = factory.newHazelcastInstance();
HazelcastInstance client = factory.newHazelcastClient();
loggingService = client.getLoggingService();
logListener = new LogListener() {
@Override
public void log(LogEvent logEvent) {
}
};
logEvent = new LogEvent(null, member.getCluster().getLocalMember());
}
Aggregations