use of org.infinispan.persistence.support.WaitNonBlockingStore in project infinispan by infinispan.
the class BaseStoreFunctionalTest method testPutAllBatch.
public void testPutAllBatch() {
int numberOfEntries = 100;
String cacheName = "testPutAllBatch";
ConfigurationBuilder cb = getDefaultCacheConfiguration();
createCacheStoreConfig(cb.persistence(), cacheName, false);
TestingUtil.defineConfiguration(cacheManager, cacheName, cb.build());
Cache<String, Object> cache = cacheManager.getCache(cacheName);
Map<String, Object> entriesMap = IntStream.range(0, numberOfEntries).boxed().collect(Collectors.toMap(Object::toString, i -> wrap(i.toString(), "Val" + i)));
cache.putAll(entriesMap);
assertEquals(numberOfEntries, cache.size());
WaitNonBlockingStore<String, Object> store = TestingUtil.getFirstStoreWait(cache);
for (int i = 0; i < numberOfEntries; ++i) {
assertNotNull("Entry for key: " + i + " was null", store.loadEntry(toStorage(cache, Integer.toString(i))));
}
}
Aggregations