abstractdog commented on code in PR #4630:
URL: https://github.com/apache/hive/pull/4630#discussion_r1316839397
##########
standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/common/metrics/metrics2/TestCodahaleReportersConf.java:
##########
@@ -149,4 +151,31 @@ public void testNoFallbackOnIncorrectConf() throws
Exception {
Assert.assertFalse(jsonReportFile.exists());
}
+
+ /**
+ * Tests if MetricsFactory is initialised properly, if in case
Metrics2Reporter is tried to add more than once.
+ *
+ * **/
+ @Test
+ public void testMetricsFactoryInitMetrics2ReporterAddedTwice() throws
Exception {
+ if(MetricsFactory.getInstance() != null) {
Review Comment:
why is this needed? I can see an @After method taking care of this
but if it turns out this is needed, you can still add it as a @Before method
(to make it applied before every test method)
--
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]