Skip to content

Comments

HDDS-14683. Remove redundant FileSystem field from test classes#9797

Merged
adoroszlai merged 2 commits intoapache:masterfrom
len548:HDDS-12355-2
Feb 21, 2026
Merged

HDDS-14683. Remove redundant FileSystem field from test classes#9797
adoroszlai merged 2 commits intoapache:masterfrom
len548:HDDS-12355-2

Conversation

@len548
Copy link
Contributor

@len548 len548 commented Feb 20, 2026

What changes were proposed in this pull request?

Removed redundant private FileSystem fs field from AbstractOzoneFileSystemTest and AbstractRootedOzoneFileSystemTest. Both classes cast fs to each type-specific filesystem instances (o3fs and ofs respectively) so all the usages of fs can be done by those instances, making it unnecessary.

What is the link to the Apache JIRA

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

How was this patch tested?

The existing CI continues to pass: https://github.com/len548/ozone/actions/runs/22192506262

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @len548 for the patch.

Comment on lines 158 to 159
private OzoneManagerProtocol writeClient;
private FileSystem fs;
private OzoneFileSystem o3fs;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep the name fs instead of o3fs and ofs, respectively? Not only does it reduce change for this patch (due to way more usage of fs vs. o3fs/ofs), it keeps the test code in the two classes more similar, which helps further refactoring.

  private OzoneFileSystem fs;

Copy link

@yandrey321 yandrey321 left a comment

Choose a reason for hiding this comment

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

lgtm

@adoroszlai adoroszlai merged commit 9b864d4 into apache:master Feb 21, 2026
29 checks passed
@adoroszlai
Copy link
Contributor

Thanks @len548 for the patch, @yandrey321 for the review.

@len548
Copy link
Contributor Author

len548 commented Feb 23, 2026

Thanks for the reviews and merge, @adoroszlai and @yandrey321

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