chia7712 commented on code in PR #20293:
URL: https://github.com/apache/kafka/pull/20293#discussion_r2301971512


##########
tools/src/test/java/org/apache/kafka/tools/streams/ResetStreamsGroupOffsetTest.java:
##########
@@ -738,4 +755,26 @@ private static void produceMessagesOnTwoPartitions(final 
int numOfMessages, fina
             data
         );
     }
+
+    /**
+     * Executes the StreamsGroupCommand with the given arguments and validates 
the exit code.
+     * <p>
+     * This helper method is used to test scenarios where the command is 
expected to exit
+     * with a specific status code (e.g., 0 for success, 1 for an error). It 
captures the
+     * exit code by using a mock {@link Exit.Procedure} and asserts that it 
matches the
+     * expected value.
+     *
+     * @param args             The command-line arguments to pass to the 
StreamsGroupCommand.
+     * @param expectedExitCode The expected exit code from the command 
execution.
+     */
+    private static void validateResetOffsetsExitCode(String[] args, int 
expectedExitCode) {

Review Comment:
   It looks like there is some duplciate code in this package. Could you try to 
eliminate it?



-- 
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