From c8ad274db05ab92659902075fc4243fc91c33252 Mon Sep 17 00:00:00 2001 From: Antony Stubbs Date: Mon, 30 Nov 2020 15:57:44 +0000 Subject: [PATCH] Squash! Fix test --- .../ParallelEoSStreamProcessorTest.java | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java b/parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java index 26d9a7541..944a6dbac 100644 --- a/parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java +++ b/parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java @@ -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>> maps = getCommitHistory(); - assertThat(maps).isNotEmpty(); - List metas = new ArrayList<>(); - for (final Map> map : maps) { - for (final Map value : map.values()) { - for (final OffsetAndMetadata offsetAndMetadata : value.values()) { - metas.add(offsetAndMetadata); - } - } - } - for (final OffsetAndMetadata meta : metas) { - assertThat(meta.offset()).isEqualTo(0L); - TreeSet incompletes = - OffsetMapCodecManager.deserialiseIncompleteOffsetMapFromBase64(0, meta.metadata()).getRight(); - assertThat(incompletes).containsExactly(0L); - } + assertCommits(of(), "All erroring, so nothing committed except initial"); } @ParameterizedTest()