Tests: Assert-Beschreibungen korrigiert/ergänzt
authorKai Moritz <kai@juplo.de>
Fri, 15 Apr 2022 10:08:50 +0000 (12:08 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 15 Apr 2022 10:16:03 +0000 (12:16 +0200)
src/test/java/de/juplo/kafka/ApplicationTests.java

index 6f58180..f541093 100644 (file)
@@ -129,7 +129,9 @@ class ApplicationTests
                {
                        Long expected = offsetsToCheck.get(tp) + 1;
                        log.debug("Checking, if the offset for {} is {}", tp, expected);
-                       assertThat(offset).isEqualTo(expected);
+                       assertThat(offset)
+                                       .describedAs("Committed offset corresponds to the offset of the consumer")
+                                       .isEqualTo(expected);
                });
        }
 
@@ -147,7 +149,9 @@ class ApplicationTests
                                withProgress.add(tp);
                        }
                });
-               assertThat(withProgress).isNotEmpty().describedAs("Found no partitions with any offset-progress");
+               assertThat(withProgress)
+                               .describedAs("Some offsets must have changed, compared to the old offset-positions")
+                               .isNotEmpty();
        }