From: Kai Moritz Date: Fri, 15 Apr 2022 10:08:50 +0000 (+0200) Subject: Tests: Assert-Beschreibungen korrigiert/ergänzt X-Git-Tag: wip-DEPRECATED~11^2^2~9 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=0742ee524d115b9e2969a66a52607be9eb5d699b;p=demos%2Fkafka%2Ftraining Tests: Assert-Beschreibungen korrigiert/ergänzt --- diff --git a/src/test/java/de/juplo/kafka/ApplicationTests.java b/src/test/java/de/juplo/kafka/ApplicationTests.java index 6f58180..f541093 100644 --- a/src/test/java/de/juplo/kafka/ApplicationTests.java +++ b/src/test/java/de/juplo/kafka/ApplicationTests.java @@ -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(); }