for (int i = 0; i < valueCount; i++) {
compositeActivityValues.update(UID_BASE + i, String.format("%08d", valueCount + i), toMap(new JSONObject().put("likes", "+1")));
}
compositeActivityValues.flush();
compositeActivityValues.syncWithPersistentVersion(String.format("%08d", valueCount - 1));
LongList uidsToDelete = new LongArrayList();
for (int i = 0; i < valueCount; i++) {
if (i == 2) {
continue;
}
uidsToDelete.add(UID_BASE + i);
if (i %1000 == 0) {
compositeActivityValues.delete(uidsToDelete.toLongArray());
uidsToDelete.clear();
}
}
compositeActivityValues.flush();
compositeActivityValues.delete(uidsToDelete.toLongArray());
compositeActivityValues.flush();
int notDeletedIndex = compositeActivityValues.uidToArrayIndex.get(UID_BASE + 2);
final CompositeActivityValues testActivityData = compositeActivityValues;
Wait.until(10000L, "", new Wait.Condition() {
public boolean evaluate() {