HDDS-9524. Clean up wait for leader OM in integration tests#6092
Merged
adoroszlai merged 3 commits intoapache:masterfrom Jan 26, 2024
Merged
HDDS-9524. Clean up wait for leader OM in integration tests#6092adoroszlai merged 3 commits intoapache:masterfrom
adoroszlai merged 3 commits intoapache:masterfrom
Conversation
adoroszlai
reviewed
Jan 25, 2024
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @david1859168 for the patch. Findbugs reports an unused variable:
M D DLS: Dead store to timeout in org.apache.hadoop.ozone.om.TestOzoneManagerHA.waitForLeaderToBeReady() At TestOzoneManagerHA.java:[line 463]
https://github.com/david1859168/ozone/actions/runs/7652102229/job/20851218541#step:7:11
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHA.java
Outdated
Show resolved
Hide resolved
adoroszlai
approved these changes
Jan 25, 2024
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @david1859168 for updating the patch, LGTM.
aswinshakil
approved these changes
Jan 26, 2024
Member
aswinshakil
left a comment
There was a problem hiding this comment.
Nice find. Thanks for the patch @david1859168 and Thanks for the review @adoroszlai
Contributor
|
Thanks @david1859168 for the patch, @aswinshakil for the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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().
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.