chia7712 commented on a change in pull request #9855: URL: https://github.com/apache/kafka/pull/9855#discussion_r559185808
########## File path: core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala ########## @@ -1417,13 +1417,10 @@ class ConfigCommandTest extends ZooKeeperTestHarness with Logging { def checkInvalidEntity(entityType: String, entityName: Option[String], otherArgs: Array[String]): Unit = { val opts = createOpts(entityType, entityName, otherArgs) - try { + assertThrows(classOf[IllegalArgumentException], () => { opts.checkArgs() Review comment: Both checks are required so it would be better to keep them in this block. ---------------------------------------------------------------- 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