@Test
public void recordHighestSeenPartitionWhenTasksCompleteOutOfOrderWithErrors() {

    // 2 partitions will error during comparison, but after 10 successful comparisons
    // we'll still report progress to the journal
    RuntimeException toThrow = new RuntimeException("Test");
    RangeComparator comparator = comparator(context(0L, 100L));
    long[] tokens = new long[] {2, 8, 1, 11, 4, 100, 3, 5, 7, 6, 9, 0};
    comparator.compare(keys(tokens), keys(tokens), throwDuringExecution(toThrow, 3, 2));
    assertReported(100, RangeStats.withValues(10, 0L, 2L, 0L, 0L, 0L, 0L, 0L, 0L), journal);
    assertEquals(1, journal.keySet().size());
    assertReported(2, toThrow, errors);
    assertReported(3, toThrow, errors);
    assertEquals(2, errors.keySet().size());
    assertNothingReported(mismatches);
    // the erroring tasks don't get counted in the test as compared
    assertCompared(8, 1, 11, 4, 100, 5, 7, 6, 9, 0);
}