showuon commented on a change in pull request #10471:
URL: https://github.com/apache/kafka/pull/10471#discussion_r635846586



##########
File path: 
core/src/test/scala/unit/kafka/admin/ReassignPartitionsCommandArgsTest.scala
##########
@@ -230,15 +214,9 @@ class ReassignPartitionsCommandArgsTest {
   }
 
   @Test
-  def testInvalidCommandConfigArgumentForLegacyGenerate(): Unit = {
-    val args = Array(
-      "--zookeeper", "localhost:1234",
-      "--generate",
-      "--broker-list", "101,102",
-      "--topics-to-move-json-file", "myfile.json",
-      "--command-config", "/tmp/command-config.properties"
-    )
-    shouldFailWith("You must specify --bootstrap-server when using 
\"[command-config]\"", args)
+  def shouldPrintHelpTextIfHelpArg(): Unit = {
+    val args: Array[String]= Array("--help")
+    shouldFailWith(ReassignPartitionsCommand.helpText, args)

Review comment:
       Yes, it should not fail actually. But we share the same 
`printUsageAndDie` method with other wrong argument cases, so it indeed fail in 
the logic. I think it's OK since user won't feel it's a failed run anyway. I'll 
add a comment here. Thanks.
   
   ref: 
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/utils/CommandLineUtils.scala#L57




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

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


Reply via email to