// Now check if the slops worked
Iterator<Versioned<Slop>> entryIterator0 = entrySetNode0.listIterator();
while(entryIterator0.hasNext()) {
Versioned<Slop> versionedSlop = entryIterator0.next();
Slop nextSlop = versionedSlop.getValue();
StorageEngine<ByteArray, byte[], byte[]> store = getVoldemortServer(1).getStoreRepository()
.getStorageEngine(nextSlop.getStoreName());
if(nextSlop.getOperation().equals(Slop.Operation.PUT)) {
assertNotSame("entry should be present at store",
0,
store.get(nextSlop.getKey(), null).size());
assertEquals("entry value should match",
new String(nextSlop.getValue()),
new String(store.get(nextSlop.getKey(), null).get(0).getValue()));
} else if(nextSlop.getOperation().equals(Slop.Operation.DELETE)) {
assertEquals("entry value should match", 0, store.get(nextSlop.getKey(), null)
.size());
}
// did it get deleted correctly
assertEquals("slop should have gone", 0, slopStoreNode0.get(nextSlop.makeKey(), null)
.size());
}
Iterator<Versioned<Slop>> entryIterator1 = entrySetNode1.listIterator();
while(entryIterator1.hasNext()) {
Versioned<Slop> versionedSlop = entryIterator1.next();
Slop nextSlop = versionedSlop.getValue();
StorageEngine<ByteArray, byte[], byte[]> store = getVoldemortServer(0).getStoreRepository()
.getStorageEngine(nextSlop.getStoreName());
if(nextSlop.getOperation().equals(Slop.Operation.PUT)) {
assertNotSame("entry should be present at store",
0,
store.get(nextSlop.getKey(), null).size());
assertEquals("entry value should match",
new String(nextSlop.getValue()),
new String(store.get(nextSlop.getKey(), null).get(0).getValue()));
} else if(nextSlop.getOperation().equals(Slop.Operation.DELETE)) {
assertEquals("entry value should match", 0, store.get(nextSlop.getKey(), null)
.size());
}
// did it get deleted correctly
assertEquals("slop should have gone", 0, slopStoreNode1.get(nextSlop.makeKey(), null)
.size());
}
// Check counts
SlopStorageEngine slopEngine = getVoldemortServer(0).getStoreRepository().getSlopStore();