david1859168 opened a new pull request, #6092:
URL: https://github.com/apache/ozone/pull/6092

   ## What changes were proposed in this pull request?
   MiniOzoneHAClusterImpl:
   
   getOMLeader() returns current OM leader.
   getOMLeader(boolean) optionally waits until OM leader is elected
   There are some tests that implement the same "wait for leader OM" logic 
using the non-waiting getOMLeader(). 
   
   ```
   
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestAddRemoveOzoneManager.java
   209:    GenericTestUtils.waitFor(() -> cluster.getOMLeader() != null, 500, 
30000);
   437:    GenericTestUtils.waitFor(() -> cluster.getOMLeader() != null, 500, 
30000);
   
   
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHA.java
   466:        getCluster().getOMLeader() != null, 500, timeout);
   
   
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHASnapshot.java
   126:    await(120_000, 100, () -> cluster.getOMLeader() != null);
   253:    await(180_000, 100, () -> cluster.getOMLeader() != null);
   ```
   
   Goals of this task:
   rename getOMLeader(boolean) to waitForLeaderOM() (the method is only called 
with true)
   make waitForLeaderOM() public
   replace duplicated wait logic in tests with a call to waitForLeaderOM()
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-9524
   
   ## How was this patch tested?
   Made changes and ran unit test.
   


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