vyalamar commented on code in PR #9771:
URL: https://github.com/apache/ozone/pull/9771#discussion_r2902475279


##########
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/metrics/TestS3GatewayMetrics.java:
##########
@@ -117,6 +117,14 @@ public void setup() throws Exception {
     metrics = bucketEndpoint.getMetrics();
   }
 
+  @Test
+  public void testMetricsCreateIsIdempotent() {

Review Comment:
   Added config coverage in `TestS3GatewayMetrics`: it now verifies disabled 
and enabled behavior, and also checks that the metrics source is not published 
when metrics are disabled.



##########
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/metrics/TestS3GatewayMetrics.java:
##########
@@ -117,6 +117,14 @@ public void setup() throws Exception {
     metrics = bucketEndpoint.getMetrics();
   }
 
+  @Test
+  public void testMetricsCreateIsIdempotent() {
+    S3GatewayMetrics m1 = S3GatewayMetrics.create(new OzoneConfiguration());
+    S3GatewayMetrics m2 = S3GatewayMetrics.create(new OzoneConfiguration());

Review Comment:
   Fixed the test compile issue by adding the missing `OzoneConfiguration` 
import. I also reran `mvn -pl hadoop-ozone/s3gateway -am 
-Dtest=TestS3GatewayMetrics -Dsurefire.failIfNoSpecifiedTests=false test`; it 
passes now.



-- 
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