dttung2905 commented on code in PR #13697:
URL: https://github.com/apache/pinot/pull/13697#discussion_r1694205446


##########
pinot-common/src/test/java/org/apache/pinot/common/metrics/AbstractMetricsTest.java:
##########
@@ -48,4 +52,79 @@ public void testAddOrUpdateGauge() {
     controllerMetrics.removeGauge(metricName);
     
Assert.assertTrue(controllerMetrics.getMetricsRegistry().allMetrics().isEmpty());
   }
+
+  @Test
+  public void testInvalidConfig() {
+    PinotConfiguration pinotConfiguration = new PinotConfiguration();
+    pinotConfiguration.setProperty(CONFIG_OF_METRICS_FACTORY_CLASS_NAME,
+        "invalid.metrics.factory.class.name");
+    try {
+      PinotMetricUtils.init(pinotConfiguration);
+      Assert.fail("Expected exception thrown");
+    } catch (Exception e) {
+      Assert.assertTrue(e instanceof RuntimeException, "Expected 
RuntimeException");
+    }
+  }

Review Comment:
   Hmm I'm not entirely sure why this happens. In my local machine, this test 
passes though :thinking: 
   ```
   Error:  Failures: 
   Error:    AbstractMetricsTest.testInvalidConfig:63 Expected exception thrown
   ```
   
https://github.com/apache/pinot/actions/runs/10125037774/job/28000076994?pr=13697



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to