jackjlli commented on code in PR #13679:
URL: https://github.com/apache/pinot/pull/13679#discussion_r1687219963


##########
pinot-common/src/test/java/org/apache/pinot/common/metrics/AbstractMetricsTest.java:
##########
@@ -48,4 +53,30 @@ public void testAddOrUpdateGauge() {
     controllerMetrics.removeGauge(metricName);
     
Assert.assertTrue(controllerMetrics.getMetricsRegistry().allMetrics().isEmpty());
   }
+
+  @Test
+  public void testUpdateAndRemoveGauge()

Review Comment:
   In order to avoid leaving the orphan metrics from the previous test, can we 
add a method with the `@BeforeTest` annotation to clean up all the old metrics?
   
   You can do sth like:
   ```
       // Remove metrics if exists
       for (Map.Entry<PinotMetricName, PinotMetric> entry : 
metricsRegistry.allMetrics().entrySet()) {
         metricsRegistry.removeMetric(entry.getKey());
       }
   ```



-- 
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...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to