From: Kai Moritz Date: Mon, 17 Jun 2024 19:53:34 +0000 (+0200) Subject: popular: 1.1.0 - Formulated expectations for suppressed results X-Git-Tag: popular-1.1.0~1 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=6b2bd03c093ed1b3e3b353c8b862b8fc8575611b;p=demos%2Fkafka%2Fwordcount popular: 1.1.0 - Formulated expectations for suppressed results * Removed result-messages, that will be supressed * Added additionally messages, that are necessary, to advance the stream-time and close the window. --- diff --git a/pom.xml b/pom.xml index a9aae74..a9ba9e1 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ de.juplo.kafka.wordcount popular - 1.0.0 + 1.1.0 Wordcount-Popular-Words Query stream-processor that gives access to the most popular words diff --git a/src/test/java/de/juplo/kafka/wordcount/popular/TestData.java b/src/test/java/de/juplo/kafka/wordcount/popular/TestData.java index 372e0c0..fa6a258 100644 --- a/src/test/java/de/juplo/kafka/wordcount/popular/TestData.java +++ b/src/test/java/de/juplo/kafka/wordcount/popular/TestData.java @@ -102,6 +102,26 @@ class TestData instantOfSecond(20), InputUser.of(KLAUS), InputWord.of(KLAUS, WORD_S)), + TestMessage.of( + instantOfSecond((int)WINDOW_SIZE.toSeconds()), + InputUser.of(PETER), + InputWord.of(PETER, WORD_HALLO)), + TestMessage.of( + instantOfSecond((int)WINDOW_SIZE.toSeconds()), + InputUser.of(KLAUS), + InputWord.of(KLAUS, WORD_MÜSCH)), + TestMessage.of( + instantOfSecond((int)WINDOW_SIZE.toSeconds()), + InputUser.of(PETER), + InputWord.of(PETER, WORD_WELT)), + TestMessage.of( + instantOfSecond((int)WINDOW_SIZE.toSeconds()), + InputUser.of(KLAUS), + InputWord.of(KLAUS, WORD_S)), + TestMessage.of( + instantOfSecond((int)WINDOW_SIZE.toSeconds()), + InputUser.of(PETER), + InputWord.of(PETER, WORD_BOÄH)), }; private static Instant instantOfSecond(int second) @@ -223,30 +243,12 @@ class TestData KeyValue.pair( WINDOWED_WORD_HALLO, OutputWordCounter.of(WORD_HALLO,1)), - KeyValue.pair( - WINDOWED_WORD_MÜSCH, - OutputWordCounter.of(WORD_MÜSCH,1)), - KeyValue.pair( - WINDOWED_WORD_WELT, - OutputWordCounter.of(WORD_WELT,1)), KeyValue.pair( WINDOWED_WORD_MÜSCH, OutputWordCounter.of(WORD_MÜSCH,2)), - KeyValue.pair( - WINDOWED_WORD_S, - OutputWordCounter.of(WORD_S,1)), - KeyValue.pair( - WINDOWED_WORD_BOÄH, - OutputWordCounter.of(WORD_BOÄH,1)), KeyValue.pair( WINDOWED_WORD_WELT, OutputWordCounter.of(WORD_WELT,2)), - KeyValue.pair( - WINDOWED_WORD_BOÄH, - OutputWordCounter.of(WORD_BOÄH,2)), - KeyValue.pair( - WINDOWED_WORD_S, - OutputWordCounter.of(WORD_S,2)), KeyValue.pair( WINDOWED_WORD_BOÄH, OutputWordCounter.of(WORD_BOÄH,3)),