projects
/
demos
/
kafka
/
training
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Eindeutigere Log-Meldungen für den Test
[demos/kafka/training]
/
src
/
test
/
java
/
de
/
juplo
/
kafka
/
ApplicationTests.java
diff --git
a/src/test/java/de/juplo/kafka/ApplicationTests.java
b/src/test/java/de/juplo/kafka/ApplicationTests.java
index
52ecc0f
..
3a10cd1
100644
(file)
--- a/
src/test/java/de/juplo/kafka/ApplicationTests.java
+++ b/
src/test/java/de/juplo/kafka/ApplicationTests.java
@@
-149,7
+149,7
@@
class ApplicationTests
doForCurrentOffsets((tp, offset) ->
{
Long expected = offsetsToCheck.get(tp) + 1;
doForCurrentOffsets((tp, offset) ->
{
Long expected = offsetsToCheck.get(tp) + 1;
- log.debug("
Checking, if the offset for {} is {}", tp, expected
);
+ log.debug("
TEST: Comparing the expected offset of {} for {} to {}", expected, tp, offset
);
assertThat(offset)
.describedAs("Committed offset corresponds to the offset of the consumer")
.isEqualTo(expected);
assertThat(offset)
.describedAs("Committed offset corresponds to the offset of the consumer")
.isEqualTo(expected);
@@
-166,10
+166,11
@@
class ApplicationTests
Long newOffset = newOffsets.get(tp);
if (!oldOffset.equals(newOffset))
{
Long newOffset = newOffsets.get(tp);
if (!oldOffset.equals(newOffset))
{
- log.debug("Progress for {}: {} -> {}", tp, oldOffset, newOffset);
+ log.debug("
TEST:
Progress for {}: {} -> {}", tp, oldOffset, newOffset);
withProgress.add(tp);
}
});
withProgress.add(tp);
}
});
+ log.debug("TEST: Offsets with progress: {}", withProgress);
assertThat(withProgress)
.describedAs("Some offsets must have changed, compared to the old offset-positions")
.isNotEmpty();
assertThat(withProgress)
.describedAs("Some offsets must have changed, compared to the old offset-positions")
.isNotEmpty();
@@
-218,7
+219,7
@@
class ApplicationTests
if (metadata != null)
{
log.debug(
if (metadata != null)
{
log.debug(
- "
{}|
{} - {}={}",
+ "
TEST: Sending partition={}, offset=
{} - {}={}",
metadata.partition(),
metadata.offset(),
record.key(),
metadata.partition(),
metadata.offset(),
record.key(),
@@
-227,7
+228,7
@@
class ApplicationTests
else
{
log.warn(
else
{
log.warn(
- "Exception for {}={}: {}",
+ "
TEST:
Exception for {}={}: {}",
record.key(),
record.value(),
e.toString());
record.key(),
record.value(),
e.toString());
@@
-265,6
+266,7
@@
class ApplicationTests
record ->
{
receivedRecords.add(record);
record ->
{
receivedRecords.add(record);
+ log.debug("TEST: Processing record #{}: {}", receivedRecords.size(), record.value());
newOffsets.put(
new TopicPartition(record.topic(), record.partition()),
record.offset());
newOffsets.put(
new TopicPartition(record.topic(), record.partition()),
record.offset());
@@
-282,7
+284,7
@@
class ApplicationTests
}
catch (Exception e)
{
}
catch (Exception e)
{
- log.info("Exception while stopping the consumer: {}", e.toString());
+ log.info("
TEST:
Exception while stopping the consumer: {}", e.toString());
}
}
}
}