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-12130. Improve assertion compatibility with old Hadoop #7738

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Assertions.assertThat is overloaded, returning different assertion object depending on the argument. Passing an instance of raw Comparable results in compile error. Hadoop's Path used to implement raw Comparable before it was parameterized in HADOOP-16196. Thus, compiling Ozone with old Hadoop that does not have HADOOP-16196 fails.

[ERROR] hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java:[404,13] cannot find symbol
  symbol:   method isEqualTo(org.apache.hadoop.fs.Path)
  location: class java.lang.Object

This can be improved by using more specific assertion factory method (e.g. assertThatObject).

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

How was this patch tested?

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

@adoroszlai adoroszlai self-assigned this Jan 23, 2025
@nandakumar131
Copy link
Contributor

Thanks @adoroszlai for finding and fixing this!

@nandakumar131 nandakumar131 merged commit c0a6ffd into apache:master Jan 24, 2025
29 checks passed
@adoroszlai adoroszlai deleted the HDDS-12130 branch January 24, 2025 05:22
@adoroszlai
Copy link
Contributor Author

Thanks @nandakumar131 for reviewing and merging it.

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