dajac commented on a change in pull request #9417: URL: https://github.com/apache/kafka/pull/9417#discussion_r507536956
########## File path: core/src/test/scala/unit/kafka/server/ControllerMutationQuotaTest.scala ########## @@ -381,16 +381,18 @@ class ControllerMutationQuotaTest extends BaseRequestTest { Option(servers.head.metrics.metric(metricName)) } - private def verifyQuotaMetric(user: String, expectedQuota: Double): Unit = { - quotaMetric(user) match { - case Some(metric) => - val config = metric.config() - assertEquals(expectedQuota, config.quota().bound(), 0.1) - assertEquals(ControllerQuotaSamples, config.samples()) - assertEquals(ControllerQuotaWindowSizeSeconds * 1000, config.timeWindowMs()) - - case None => - fail(s"Quota metric of $user is not defined") + private def waitQuotaMetric(user: String, expectedQuota: Double): Unit = { + TestUtils.retry(200) { Review comment: nit: Could we use `DEFAULT_MAX_WAIT_MS` (defined in `o.a.k.t.TestUtils`) here? ---------------------------------------------------------------- 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