Skip to content

Commit

Permalink
Squash! Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
astubbs committed Nov 30, 2020
1 parent 4c46dd0 commit c8ad274
Showing 1 changed file with 4 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,12 @@ public void failingActionNothingCommitted(CommitMode commitMode) {
});

// let it process
int loops = 3;
waitForSomeLoopCycles(loops);
waitForSomeLoopCycles(3);

parallelConsumer.close();

//
assertCommits(of(), "All erroring, nothing committed except initial");
List<Map<String, Map<TopicPartition, OffsetAndMetadata>>> maps = getCommitHistory();
assertThat(maps).isNotEmpty();
List<OffsetAndMetadata> metas = new ArrayList<>();
for (final Map<String, Map<TopicPartition, OffsetAndMetadata>> map : maps) {
for (final Map<TopicPartition, OffsetAndMetadata> value : map.values()) {
for (final OffsetAndMetadata offsetAndMetadata : value.values()) {
metas.add(offsetAndMetadata);
}
}
}
for (final OffsetAndMetadata meta : metas) {
assertThat(meta.offset()).isEqualTo(0L);
TreeSet<Long> incompletes =
OffsetMapCodecManager.deserialiseIncompleteOffsetMapFromBase64(0, meta.metadata()).getRight();
assertThat(incompletes).containsExactly(0L);
}
assertCommits(of(), "All erroring, so nothing committed except initial");
}

@ParameterizedTest()
Expand Down

0 comments on commit c8ad274

Please sign in to comment.