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-11819. Improve mock datanode version handling in MiniOzoneCluster #7632

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

adoroszlai
Copy link
Contributor

@adoroszlai adoroszlai commented Jan 2, 2025

What changes were proposed in this pull request?

MiniOzoneCluster allows setting custom "initial" and "current" version for datanodes in integration tests.

This PR:

  • Moves the logic to DatanodeFactory, where similar logic for setting layout version already exists.
  • Replaces mocked static methods with test-specific config properties to inject the custom value. This allows future implementation of the factory to set different version for each node.
  • Removes TestDatanodeVersion, which duplicates TestBlockDataStreamOutput#testDatanodeVersion.

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

How was this patch tested?

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

@adoroszlai adoroszlai added the test label Jan 2, 2025
@adoroszlai adoroszlai self-assigned this Jan 2, 2025
@adoroszlai adoroszlai requested a review from smengcl January 2, 2025 14:23
Copy link
Contributor

@jojochuang jojochuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good. Much cleaner now. Thanks

Copy link
Contributor

@smengcl smengcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adoroszlai for the refactoring

@adoroszlai adoroszlai merged commit 60a7fdb into apache:master Jan 3, 2025
43 checks passed
@adoroszlai adoroszlai deleted the HDDS-11819 branch January 3, 2025 14:00
@adoroszlai
Copy link
Contributor Author

Thanks @jojochuang, @smengcl for the review.

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.

3 participants