use of com.hazelcast.config.ReplicatedMapConfig in project hazelcast by hazelcast.
the class ReplicatedMapStatsTest method testEmptyStatsIfDisabled.
@Test
public void testEmptyStatsIfDisabled() {
String name = randomMapName();
ReplicatedMapConfig replicatedMapConfig = new ReplicatedMapConfig();
replicatedMapConfig.setName(name);
replicatedMapConfig.setStatisticsEnabled(false);
getInstance().getConfig().addReplicatedMapConfig(replicatedMapConfig);
ReplicatedMap<Integer, Integer> replicatedMap = getInstance().getReplicatedMap(name);
replicatedMap.put(1, 1);
replicatedMap.get(1);
LocalReplicatedMapStats stats = replicatedMap.getReplicatedMapStats();
assertEquals(0, stats.getGetOperationCount());
assertEquals(0, stats.getPutOperationCount());
}
Aggregations