Skip to content

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.

nandakumar131 pushed a commit to nandakumar131/ozone that referenced this pull request Feb 10, 2025
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