hachikuji commented on a change in pull request #10974: URL: https://github.com/apache/kafka/pull/10974#discussion_r664154672
########## File path: tools/src/test/java/org/apache/kafka/tools/TransactionsCommandTest.java ########## @@ -437,6 +442,536 @@ public void testOldBrokerAbortTransactionWithUnknownCoordinatorEpoch(int coordin assertNormalExit(); } + @Test + public void testFindHangingRequiresEitherBrokerIdOrTopic() throws Exception { + assertCommandFailure(new String[]{ + "--bootstrap-server", + "localhost:9092", + "find-hanging" + }); + } + + @Test + public void testFindHangingRequiresTopicIfPartitionIsSpecified() throws Exception { + assertCommandFailure(new String[]{ + "--bootstrap-server", + "localhost:9092", + "find-hanging", + "--broker-id", + "0", + "--partition", + "5" + }); + } + + private void expectListTransactions( + Map<Integer, Collection<TransactionListing>> listingsByBroker + ) { + expectListTransactions(null, listingsByBroker); Review comment: Yeah, I was trying to deal with the fact that `TransactionsCommand` invokes both variants of `listTransactions`. I dealt with it by modifying the no-arg call to provide the options explicitly. -- 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