yyj8 commented on code in PR #19047: URL: https://github.com/apache/pulsar/pull/19047#discussion_r1061438003
########## pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java: ########## @@ -310,11 +310,11 @@ public void testPerTopicStats() throws Exception { assertEquals(cm.get(1).tags.get("namespace"), "my-property/use/my-ns"); cm = (List<Metric>) metrics.get("pulsar_producers_count"); - assertEquals(cm.size(), 3); - assertEquals(cm.get(1).tags.get("topic"), "persistent://my-property/use/my-ns/my-topic2"); + assertEquals(cm.size(), 2); Review Comment: > Well, if you're already here and adding new functionality (broker-level metrics), I would advise adding a test to ensure it works and will never break. Probably in a new method. The broker-level metrics unit test has been added at the method ```testPerBrokerStats```. commit: https://github.com/apache/pulsar/pull/19047/commits/e404afd78cd965c27fe7247352d377713880cf9b -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org