You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "hudeqi (via GitHub)" <gi...@apache.org> on 2023/03/29 20:30:50 UTC
[GitHub] [kafka] hudeqi commented on a diff in pull request #13471: KAFKA-14868:Add metric counting capability to KafkaMetricsGroup to facilitate checking that the metric is missed when it is closed
hudeqi commented on code in PR #13471:
URL: https://github.com/apache/kafka/pull/13471#discussion_r1152449837
##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -4485,6 +4485,25 @@ class ReplicaManagerTest {
assertTrue(response.usableBytes >= 0)
}
}
+
+ @Test
+ def checkRemoveMetricsCountMatchRegisterCount(): Unit = {
Review Comment:
Hello, I changed the KafkaMetricsGroup to facilitate the use of this kind of metric check for each class, and avoid mockConstruction(like above logic: numAddCount++, numRemoveCount, then compare) once for each class.
Do you think this is unnecessary? @divijvaidya
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org