dajac commented on code in PR #18510:
URL: https://github.com/apache/kafka/pull/18510#discussion_r2019012548


##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/share/ShareGroupStateMessageFormatterTest.java:
##########
@@ -164,12 +164,16 @@ private static Stream<Arguments> exceptions() {
             Arguments.of(
                 MessageUtil.toVersionPrefixedByteBuffer((short) 0, 
SHARE_SNAPSHOT_KEY).array(),
                 MessageUtil.toVersionPrefixedByteBuffer((short) 0, 
SHARE_UPDATE_VALUE).array(),
-                new RuntimeException("non-nullable field stateBatches was 
serialized as null")
+                new RuntimeException("Could not read record at offset 0 due 
to: " +
+                        "Could not read record with version 0 from value's 
buffer due to: " +
+                        "non-nullable field stateBatches was serialized as 
null.")
             ),
             Arguments.of(
                 MessageUtil.toVersionPrefixedByteBuffer((short) 1, 
SHARE_UPDATE_KEY).array(),
                 MessageUtil.toVersionPrefixedByteBuffer((short) 0, 
SHARE_SNAPSHOT_VALUE).array(),
-                new RuntimeException("non-nullable field stateBatches was 
serialized as null")
+                new RuntimeException("Could not read record at offset 0 due 
to: " +
+                        "Could not read record with version 0 from value's 
buffer due to: " +
+                        "non-nullable field stateBatches was serialized as 
null.")
             )
         );
     }

Review Comment:
   Could we remove `testShareGroupStateMessageFormatter`? We have it in the 
parent class now.



##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/share/ShareGroupStateMessageFormatterTest.java:
##########
@@ -137,23 +137,23 @@ private static Stream<Arguments> parameters() {
             Arguments.of(
                 MessageUtil.toVersionPrefixedByteBuffer((short) 0, 
SHARE_SNAPSHOT_KEY).array(),
                 MessageUtil.toVersionPrefixedByteBuffer((short) 0, 
SHARE_SNAPSHOT_VALUE).array(),
-                
"{\"key\":{\"version\":0,\"data\":{\"groupId\":\"gs1\",\"topicId\":\"gtb2stGYRk-vWZ2zAozmoA\",\"partition\":0}},\"value\":{\"version\":0,\"data\":{\"snapshotEpoch\":0,\"stateEpoch\":1,\"leaderEpoch\":20,\"startOffset\":50,\"stateBatches\":[{\"firstOffset\":100,\"lastOffset\":200,\"deliveryState\":1,\"deliveryCount\":10},{\"firstOffset\":201,\"lastOffset\":210,\"deliveryState\":2,\"deliveryCount\":10}]}}}"
+                
"{\"key\":{\"type\":0,\"data\":{\"groupId\":\"gs1\",\"topicId\":\"gtb2stGYRk-vWZ2zAozmoA\",\"partition\":0}},\"value\":{\"version\":0,\"data\":{\"snapshotEpoch\":0,\"stateEpoch\":1,\"leaderEpoch\":20,\"startOffset\":50,\"stateBatches\":[{\"firstOffset\":100,\"lastOffset\":200,\"deliveryState\":1,\"deliveryCount\":10},{\"firstOffset\":201,\"lastOffset\":210,\"deliveryState\":2,\"deliveryCount\":10}]}}}"

Review Comment:
   nit: Would it be possible to use the new test blocks like we did for the 
other formatters?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to