philipnee commented on code in PR #12545:
URL: https://github.com/apache/kafka/pull/12545#discussion_r1006246642
##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -263,6 +264,16 @@ public String deserialize(String topic, byte[] data) {
return super.deserialize(topic, data);
}
}
+
+ @Override
+ public String deserialize(String topic, Headers headers,
ByteBuffer data) {
+ if (i == recordIndex) {
+ throw new SerializationException();
+ } else {
Review Comment:
you actually don't need the else there, because it will just throw. It
would be a bit cleaner if you do:
```
if (i == recordIndex) {
throw new SerializationException();
}
i++;
return super.deserialize(topic, headers, data);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]