use of org.apache.cassandra.db.DeletionInfo in project cassandra by apache.
the class DataResolverTest method assertRepairContainsDeletions.
private void assertRepairContainsDeletions(Mutation mutation, DeletionTime deletionTime, RangeTombstone... rangeTombstones) {
PartitionUpdate update = mutation.getPartitionUpdates().iterator().next();
DeletionInfo deletionInfo = update.deletionInfo();
if (deletionTime != null)
assertEquals(deletionTime, deletionInfo.getPartitionDeletion());
assertEquals(rangeTombstones.length, deletionInfo.rangeCount());
Iterator<RangeTombstone> ranges = deletionInfo.rangeIterator(false);
int i = 0;
while (ranges.hasNext()) {
RangeTombstone expected = rangeTombstones[i++];
RangeTombstone actual = ranges.next();
String msg = String.format("Expected %s, but got %s", expected.toString(cfm.comparator), actual.toString(cfm.comparator));
assertEquals(msg, expected, actual);
}
}
Aggregations