Vorlage vereinfacht: Rebalance-Listener entfernt
[demos/kafka/training] / src / test / java / de / juplo / kafka / GenericApplicationTests.java
index 595ef89..e63c5ce 100644 (file)
@@ -67,8 +67,6 @@ abstract class GenericApplicationTests<K, V>
        @Autowired
        MongoProperties mongoProperties;
        @Autowired
-       ConsumerRebalanceListener rebalanceListener;
-       @Autowired
        RecordHandler<K, V> recordHandler;
 
        KafkaProducer<Bytes, Bytes> testRecordProducer;
@@ -213,7 +211,7 @@ abstract class GenericApplicationTests<K, V>
                        Long expected = offsetsToCheck.get(tp) + 1;
                        log.debug("Checking, if the offset {} for {} is at most {}", offset, tp, expected);
                        assertThat(offset)
-                                       .describedAs("Committed offset corresponds to the offset of the consumer")
+                                       .describedAs("Committed offset must be at most equal to the offset of the consumer")
                                        .isLessThanOrEqualTo(expected);
                        isOffsetBehindSeen.add(offset < expected);
                });
@@ -376,7 +374,6 @@ abstract class GenericApplicationTests<K, V>
                                                properties.getClientId(),
                                                properties.getTopic(),
                                                kafkaConsumer,
-                                               rebalanceListener,
                                                captureOffsetAndExecuteTestHandler);
 
                endlessConsumer.start();