use of com.hazelcast.simulator.tests.map.helpers.MapStoreWithCounterPerKey in project hazelcast-simulator by hazelcast.
the class MapEvictAndStoreTest method verify.
@Verify(global = false)
public void verify() {
if (isClient(targetInstance)) {
return;
}
MapConfig mapConfig = targetInstance.getConfig().getMapConfig(name);
logger.info(name + ": MapConfig: " + mapConfig);
MapStoreConfig mapStoreConfig = mapConfig.getMapStoreConfig();
logger.info(name + ": MapStoreConfig: " + mapStoreConfig);
int sleepSeconds = mapConfig.getTimeToLiveSeconds() * 2 + mapStoreConfig.getWriteDelaySeconds() * 2;
logger.info("Sleeping for " + sleepSeconds + " seconds to wait for delay and TTL values.");
sleepSeconds(sleepSeconds);
MapStoreWithCounterPerKey mapStore = (MapStoreWithCounterPerKey) mapStoreConfig.getImplementation();
logger.info(name + ": map size = " + map.size());
logger.info(name + ": map store = " + mapStore);
logger.info(name + ": Checking if some keys where stored more than once");
for (Object key : mapStore.keySet()) {
assertEquals("There were multiple calls to MapStore.store", 1, mapStore.valueOf(key));
}
}
Aggregations