Skip to content
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-10225. Speed up TestSCMHAManagerImpl #6109

Merged
merged 8 commits into from
Jan 30, 2024

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

TestSCMHAManagerImpl has three test cases, each starting new leader SCM from scratch:

  • add SCM
  • remove SCM
  • invalid scenarios
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 47.041 s - in org.apache.hadoop.hdds.scm.ha.TestSCMHAManagerImpl

This change reduces test execution time by starting a single leader SCM.

  1. Testing removal of peer requires adding it first, so testRemoveSCM already depends on "add SCM" functionality working correctly. The patch deletes "add SCM" setup from testRemoveSCM, now it relies on the state left by testAddSCM.
  2. Testing invalid scenarios does not need a fresh SCM leader, requests being tested are invalid either way.

Also, some additional code cleanup, performed in separate commits for easier review.

https://issues.apache.org/jira/browse/HDDS-10225

How was this patch tested?

[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.489 s - in org.apache.hadoop.hdds.scm.ha.TestSCMHAManagerImpl

CI:
https://github.com/adoroszlai/ozone/actions/runs/7678209884

@adoroszlai adoroszlai self-assigned this Jan 27, 2024
@nandakumar131 nandakumar131 merged commit 1e6e6d1 into apache:master Jan 30, 2024
19 checks passed
@nandakumar131
Copy link
Contributor

Thanks @adoroszlai for the improvement!

@adoroszlai adoroszlai deleted the HDDS-10225 branch January 30, 2024 10:53
@adoroszlai
Copy link
Contributor Author

Thanks @nandakumar131 for reviewing and merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants