Search in sources :

Example 11 with LocalReplicatedMapStats

use of com.hazelcast.monitor.LocalReplicatedMapStats in project hazelcast by hazelcast.

the class ReplicatedMapStatsTest method testPutOperationCount_afterPutAll.

@Test
public void testPutOperationCount_afterPutAll() {
    Map<Integer, Integer> map = new HashMap<Integer, Integer>();
    for (int i = 1; i <= 100; i++) {
        map.put(i, i);
    }
    ReplicatedMap<Integer, Integer> replicatedMap = getReplicatedMap();
    replicatedMap.putAll(map);
    final LocalReplicatedMapStats stats = replicatedMap.getReplicatedMapStats();
    assertTrueEventually(new AssertTask() {

        @Override
        public void run() throws Exception {
            assertEquals(100, stats.getPutOperationCount());
        }
    });
}
Also used : HashMap(java.util.HashMap) AssertTask(com.hazelcast.test.AssertTask) LocalReplicatedMapStats(com.hazelcast.monitor.LocalReplicatedMapStats) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

LocalReplicatedMapStats (com.hazelcast.monitor.LocalReplicatedMapStats)11 ParallelTest (com.hazelcast.test.annotation.ParallelTest)10 QuickTest (com.hazelcast.test.annotation.QuickTest)10 Test (org.junit.Test)10 AssertTask (com.hazelcast.test.AssertTask)4 JsonArray (com.eclipsesource.json.JsonArray)1 JsonObject (com.eclipsesource.json.JsonObject)1 JsonValue (com.eclipsesource.json.JsonValue)1 ClientEndPointDTO (com.hazelcast.internal.management.dto.ClientEndPointDTO)1 ClusterHotRestartStatusDTO (com.hazelcast.internal.management.dto.ClusterHotRestartStatusDTO)1 MXBeansDTO (com.hazelcast.internal.management.dto.MXBeansDTO)1 LocalCacheStats (com.hazelcast.monitor.LocalCacheStats)1 LocalWanStats (com.hazelcast.monitor.LocalWanStats)1 HashMap (java.util.HashMap)1