You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by na...@apache.org on 2025/01/24 04:44:07 UTC
(ozone) branch master updated: HDDS-12130. Improve assertion compatibility with old Hadoop (#7738)
This is an automated email from the ASF dual-hosted git repository.
nanda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new c0a6ffd6dd HDDS-12130. Improve assertion compatibility with old Hadoop (#7738)
c0a6ffd6dd is described below
commit c0a6ffd6dda7432f57e38bcf3f5ababdd7999e26
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Fri Jan 24 05:44:02 2025 +0100
HDDS-12130. Improve assertion compatibility with old Hadoop (#7738)
---
.../fs/contract/AbstractContractGetFileStatusTest.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java
index 12cfba2312..6efe2c9d71 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java
@@ -394,7 +394,7 @@ private void validateListingForFile(Path f,
Assertions.assertThat(statusList)
.describedAs(msg)
.hasSize(1);
- Assertions.assertThat(statusList.get(0).getPath())
+ Assertions.assertThatObject(statusList.get(0).getPath())
.describedAs("path returned should match with the input path")
.isEqualTo(f);
Assertions.assertThat(statusList.get(0).isFile())
@@ -471,7 +471,7 @@ private void verifyStatusArrayMatchesFile(Path f, FileStatus[] status) {
* @param fileStatus status to validate
*/
private void assertIsNamedFile(Path f, FileStatus fileStatus) {
- Assertions.assertThat(fileStatus.getPath())
+ Assertions.assertThatObject(fileStatus.getPath())
.withFailMessage("Wrong pathname in " + fileStatus)
.isEqualTo(f);
Assertions.assertThat(fileStatus.isFile())
@@ -569,15 +569,15 @@ public void testListStatusFiltering() throws Throwable {
MatchesNameFilter file1Filter = new MatchesNameFilter("file-1.txt");
result = verifyListStatus(1, parent, file1Filter);
- Assertions.assertThat(result[0].getPath())
+ Assertions.assertThatObject(result[0].getPath())
.isEqualTo(file1);
verifyListStatus(0, file1, NO_PATHS);
result = verifyListStatus(1, file1, ALL_PATHS);
- Assertions.assertThat(result[0].getPath())
+ Assertions.assertThatObject(result[0].getPath())
.isEqualTo(file1);
result = verifyListStatus(1, file1, file1Filter);
- Assertions.assertThat(result[0].getPath())
+ Assertions.assertThatObject(result[0].getPath())
.isEqualTo(file1);
// empty subdirectory
@@ -608,15 +608,15 @@ public void testListLocatedStatusFiltering() throws Throwable {
MatchesNameFilter file1Filter = new MatchesNameFilter("file-1.txt");
result = verifyListLocatedStatus(xfs, 1, parent, file1Filter);
- Assertions.assertThat(result.get(0).getPath())
+ Assertions.assertThatObject(result.get(0).getPath())
.isEqualTo(file1);
verifyListLocatedStatus(xfs, 0, file1, NO_PATHS);
verifyListLocatedStatus(xfs, 1, file1, ALL_PATHS);
- Assertions.assertThat(result.get(0).getPath())
+ Assertions.assertThatObject(result.get(0).getPath())
.isEqualTo(file1);
verifyListLocatedStatus(xfs, 1, file1, file1Filter);
- Assertions.assertThat(result.get(0).getPath())
+ Assertions.assertThatObject(result.get(0).getPath())
.isEqualTo(file1);
verifyListLocatedStatusNextCalls(xfs, 1, file1, file1Filter);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org