apovzner commented on a change in pull request #9628:
URL: https://github.com/apache/kafka/pull/9628#discussion_r535829042



##########
File path: 
core/src/test/scala/integration/kafka/network/DynamicConnectionQuotaTest.scala
##########
@@ -259,13 +264,19 @@ class DynamicConnectionQuotaTest extends BaseRequestTest {
   }
 
   private def updateIpConnectionRate(ip: Option[String], updatedRate: Int): 
Unit = {
-    adminZkClient.changeIpConfig(ip.getOrElse(ConfigEntityName.Default),
-      CoreUtils.propsWith(DynamicConfig.Ip.IpConnectionRateOverrideProp, 
updatedRate.toString))
+    val initialConnectionCount = connectionCount
+    val adminClient = createAdminClient()

Review comment:
       `TestUtils.alterClientQuotas` called before `adminClient.close` can 
throw an exception. Admin extends AutoCloseable, so you can use 
try-with-resources.




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