Search in sources :

Example 1 with EventCount

use of com.hazelcast.simulator.tests.map.helpers.EventCount in project hazelcast-simulator by hazelcast.

the class MapEntryListenerTest method verify.

@Verify(global = false)
public void verify() {
    EventCount total = new EventCount();
    for (EventCount eventCount : eventCounts) {
        total.add(eventCount);
    }
    total.waitWhileListenerEventsIncrease(listener, 10);
    logger.info(format("Event counter for %s (actual / expected)" + "%n add: %d / %d" + "%n update: %d / %d" + "%n remove: %d / %d" + "%n evict: %d / %d" + "%n mapSize: %d / %d", name, listener.addCount.get(), total.addCount.get(), listener.updateCount.get(), total.updateCount.get(), listener.removeCount.get(), total.removeCount.get(), listener.evictCount.get(), total.evictCount.get(), total.calculateMapSize(listener), total.calculateMapSize()));
    total.assertEventsEquals(listener);
}
Also used : EventCount(com.hazelcast.simulator.tests.map.helpers.EventCount) Verify(com.hazelcast.simulator.test.annotations.Verify)

Example 2 with EventCount

use of com.hazelcast.simulator.tests.map.helpers.EventCount in project hazelcast-simulator by hazelcast.

the class MapEntryListenerTest method globalPrepare.

@Prepare(global = true)
public void globalPrepare() {
    EventCount initCounter = new EventCount();
    for (int i = 0; i < keyCount; i++) {
        map.put(i, values[i % valueLength]);
        initCounter.addCount.getAndIncrement();
    }
    eventCounts.add(initCounter);
}
Also used : EventCount(com.hazelcast.simulator.tests.map.helpers.EventCount) Prepare(com.hazelcast.simulator.test.annotations.Prepare)

Aggregations

EventCount (com.hazelcast.simulator.tests.map.helpers.EventCount)2 Prepare (com.hazelcast.simulator.test.annotations.Prepare)1 Verify (com.hazelcast.simulator.test.annotations.Verify)1