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);
}
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);
}
Aggregations