Tejaskriya commented on code in PR #9400:
URL: https://github.com/apache/ozone/pull/9400#discussion_r2622495468
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/safemode/TestSCMSafeModeManager.java:
##########
@@ -149,7 +153,8 @@ private void testSafeMode(int numContainers) throws
Exception {
assertEquals(cutOff, scmSafeModeManager.getSafeModeMetrics()
.getNumContainerWithOneReplicaReportedThreshold().value());
- GenericTestUtils.waitFor(() -> !scmSafeModeManager.getInSafeMode(),
+ GenericTestUtils.waitFor(() -> !scmSafeModeManager.getInSafeMode() &&
+ scmSafeModeManager.getSafeModeMetrics().getScmInSafeMode().value()
== 0,
Review Comment:
I would suggest to separate out the metrics check from the waitFor block in
all the occurances. That way if there was to be a failure in the metrics
capturing logic and not in the actual status of scm, debugging is easier.
--
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]