errose28 commented on code in PR #8609:
URL: https://github.com/apache/ozone/pull/8609#discussion_r2271196215


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestVolumeSet.java:
##########
@@ -113,13 +116,23 @@ public void testVolumeSetInitialization() throws 
Exception {
         "VolumeSet not initialized correctly");
     assertTrue(checkVolumeExistsInVolumeSet(volume2),
         "VolumeSet not initialized correctly");
+
+    MetricsRecordBuilder metricsRecords = 
getMetrics(volumeSet.getVolumeHealthMetrics());
+    assertGauge("TotalVolumes", 2, metricsRecords);
+    assertGauge("NumHealthyVolumes", 2, metricsRecords);
+    assertGauge("NumFailedVolumes", 0, metricsRecords);

Review Comment:
   Can we consolidate this repeated 4 line pattern to a helper method like 
`assertNumVolumes(numHealthyVolumes, numFailedVolumes)` which makes sure that 
total volumes is equal to the sum of those?



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