divijvaidya commented on code in PR #13705:
URL: https://github.com/apache/kafka/pull/13705#discussion_r1194033848


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -369,9 +369,9 @@ class ReplicaManagerTest {
       // Use the second instance of metrics group that is constructed. The 
first instance is constructed by
       // ReplicaManager constructor > BrokerTopicStats > BrokerTopicMetrics.
       val mockMetricsGroup = mockMetricsGroupCtor.constructed.get(1)
-      verify(mockMetricsGroup, times(9)).newGauge(anyString(), any())
-      verify(mockMetricsGroup, times(3)).newMeter(anyString(), anyString(), 
any(classOf[TimeUnit]))
-      verify(mockMetricsGroup, times(12)).removeMetric(anyString())
+      verify(mockMetricsGroup, 
times(ReplicaManager.GaugeMetricNames.size)).newGauge(anyString(), any())

Review Comment:
   echo'ing a comment that David provided in 
https://github.com/apache/kafka/pull/13623#discussion_r1182595446, we can 
replace the `anyString()` with actual names to verify that the argument passed 
are correct.



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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to