cmccabe commented on a change in pull request #9032: URL: https://github.com/apache/kafka/pull/9032#discussion_r479548642
########## File path: core/src/test/scala/unit/kafka/server/ClientQuotasRequestTest.scala ########## @@ -166,14 +168,11 @@ class ClientQuotasRequestTest extends BaseRequestTest { @Test def testClientQuotasForScramUsers(): Unit = { - val entityType = ConfigType.User val userName = "user" - val mechanism = ScramMechanism.SCRAM_SHA_256 - val credential = new ScramFormatter(mechanism).generateCredential("password", 4096) - val configs = adminZkClient.fetchEntityConfig(entityType, userName) - configs.setProperty(mechanism.mechanismName, ScramCredentialUtils.credentialToString(credential)) - adminZkClient.changeConfigs(entityType, userName, configs) + val results = createAdminClient().alterUserScramCredentials(util.Arrays.asList( Review comment: You need to close the admin client after creating it. I don't think Scala has try-with-resources, so you can just use a `try`... `finally` 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