Anzahl der erzeugten Test-Nachrichten wird vom `RecordGenerator` bestimmt
authorKai Moritz <kai@juplo.de>
Sun, 14 Aug 2022 13:26:26 +0000 (15:26 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 14 Aug 2022 13:26:29 +0000 (15:26 +0200)
src/test/java/de/juplo/kafka/ApplicationTests.java
src/test/java/de/juplo/kafka/GenericApplicationTests.java

index 51d579e..1272124 100644 (file)
@@ -28,7 +28,6 @@ public class ApplicationTests extends GenericApplicationTests<String, Long>
 
           @Override
           public void generate(
-              int numberOfMessagesToGenerate,
               Set<Integer> poisonPills,
               Set<Integer> logicErrors,
               Consumer<ProducerRecord<Bytes, Bytes>> messageSender)
@@ -39,7 +38,7 @@ public class ApplicationTests extends GenericApplicationTests<String, Long>
             {
               for (int key = 0; key < 10; key++)
               {
-                if (++i > numberOfMessagesToGenerate)
+                if (++i > 100)
                   return;
 
                 Bytes value = new Bytes(longSerializer.serialize(TOPIC, (long)i));
index 8b9a3ff..1aacb94 100644 (file)
@@ -239,7 +239,6 @@ abstract class GenericApplicationTests<K, V>
        public interface RecordGenerator
        {
                void generate(
-                               int numberOfMessagesToGenerate,
                                Set<Integer> poisonPills,
                                Set<Integer> logicErrors,
                                Consumer<ProducerRecord<Bytes, Bytes>> messageSender);