guihecheng commented on a change in pull request #2288:
URL: https://github.com/apache/ozone/pull/2288#discussion_r643621035



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerPrepare.java
##########
@@ -408,21 +437,27 @@ private void assertClusterPrepared(long preparedIndex,
       LambdaTestUtils.await(WAIT_TIMEOUT_MILLIS,
           1000, () -> {
           if (!om.isRunning()) {
+            LOG.info("{} is not yet started.", om.getOMNodeId());
             return false;
           } else {
             boolean preparedAtIndex = false;
             OzoneManagerPrepareState.State state =
                 om.getPrepareState().getState();
 
+            LOG.info("{} has prepare status: {} index: {}.",
+                om.getOMNodeId(), state.getStatus(), state.getIndex());
+
             if (state.getStatus() == PrepareStatus.PREPARE_COMPLETED) {
-              if (state.getIndex() == preparedIndex) {
+              if (state.getIndex() >= expectedPreparedIndex) {
                 preparedAtIndex = true;
               } else {
                 // State will not change if we are prepared at the wrong index.

Review comment:
       Oh, yes it would be fine if we don't fail fast and only fail the case 
upon timeout.




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

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