dajac commented on a change in pull request #9301:
URL: https://github.com/apache/kafka/pull/9301#discussion_r490906826



##########
File path: 
core/src/test/scala/integration/kafka/network/DynamicConnectionQuotaTest.scala
##########
@@ -202,6 +208,7 @@ class DynamicConnectionQuotaTest extends BaseRequestTest {
     val futures = newListenerNames.map { listener =>
       executor.submit((() => verifyConnectionRate(3, listenerConnRateLimit, 
listener)): Runnable)
     }
+    waitForConnectionCloseToInitState(initialConnectionCount)

Review comment:
       Shouldn't we put this after waiting for the futures (next line)?

##########
File path: 
core/src/test/scala/integration/kafka/network/DynamicConnectionQuotaTest.scala
##########
@@ -215,6 +222,7 @@ class DynamicConnectionQuotaTest extends BaseRequestTest {
       verifyConnectionRate(18, newPlaintextRateLimit, "PLAINTEXT")): Runnable)
     val externalFuture = executor.submit((() =>
       verifyConnectionRate(5, listenerConnRateLimit, "EXTERNAL")): Runnable)
+    waitForConnectionCloseToInitState(initialConnectionCount)

Review comment:
       Same comment as above.

##########
File path: 
core/src/test/scala/integration/kafka/network/DynamicConnectionQuotaTest.scala
##########
@@ -317,6 +325,12 @@ class DynamicConnectionQuotaTest extends BaseRequestTest {
     }
   }
 
+  private def waitForConnectionCloseToInitState(initialConnectionCount: Int): 
Unit = {

Review comment:
       How about calling this `waitForConnectionCount` and renaming 
`initialConnectionCount` to `expectedConnectionCount`? That makes the helper 
more generic.




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