-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-10934. Refactor TestOzoneRpcClient hierarchy #6747
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall fix makes sense. There's some other weird stuff in this area, not sure if we want to handle it in this PR or a follow up:
- The tests run for both ratis and non-ratis cases (in
TestOzoneRpcClientAbstract
) and those run only for Ratis cases (inTestOzoneRpcClientWithRatis
) seem kind of arbitrary.- Maybe we can either unify them so all tests run in both setups, or only a minimal amount of validation is done in the non-ratis setup.
TestSecureOzoneRpcClient
extendsTestOzoneRpcClient
, so now the secure tests are only running in a non-ratis OM setup.- Also tests that are unique to
TestOzoneRpcClientWithRatis
are not run in a secure setup.
- Also tests that are unique to
Thanks @errose28 for the review.
Agree, we should move them to the parent class.
This is not the case, since Will push a few more commits. |
@errose28 patch is updated, please take another look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing the refactoring @adoroszlai. LGTM
Thanks @errose28 for the review. |
(cherry picked from commit 385c4ec) Change-Id: I99e2c6332816ea345c11928d9d1182642beb22c7
(cherry picked from commit 385c4ec) Conflicts: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestSecureOzoneRpcClient.java Change-Id: I78df84af142772a188f48680b5e1aaa189afd7c3
(cherry picked from commit 385c4ec) Conflicts: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestSecureOzoneRpcClient.java Change-Id: I78df84af142772a188f48680b5e1aaa189afd7c3 HDDS-10934 amendment Change-Id: I7dfb930a6d113315dc6652a2d68e83337cdca752
What changes were proposed in this pull request?
Refactor
TestOzoneRpcClientAbstract
and its subclasses:TestOzoneRpcClient
andTestOzoneRpcClientWithRatis
are subclasses ofTestOzoneRpcClientAbstract.
They used to execute the same test cases with OM Ratis disabled (relying on default setting) and enabled (explicitly), respectively. HDDS-4498 enabled OM Ratis by default, so now both classes test with OM Ratis enabled. This change disables OM Ratis forTestOzoneRpcClient
, and fixes one test case that was failing with NPE in this setup.TestSecureOzoneRpcClient
should directly extendTestOzoneRpcClientAbstract
to avoid confusion caused by shadowed lifecycle methods.MiniOzoneCluster.Builder
tostartCluster
to avoid code duplication inTestSecureOzoneRpcClient
.TestOzoneRpcClientAbstract
toOzoneRpcClientTests
to follow naming conventions.TestOzoneRpcClientWithRatis
to the base class to extend coverage for other configs.(Items 2-5 were added after initial round of review.)
https://issues.apache.org/jira/browse/HDDS-10934
How was this patch tested?
CI:
https://github.com/adoroszlai/ozone/actions/runs/9282222672/job/25540423674#step:5:2276