From 5b23224970b48d41adf96b3f5a520411792fe696 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" <6454655+adoroszlai@users.noreply.github.com> Date: Mon, 24 Apr 2023 09:17:12 +0200 Subject: [PATCH] HADOOP-18714. Wrong StringUtils.join() called in AbstractContractRootDirectoryTest (#5578) --- .../fs/contract/AbstractContractRootDirectoryTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractRootDirectoryTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractRootDirectoryTest.java index 4b5af02ecd..924ebd0065 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractRootDirectoryTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractRootDirectoryTest.java @@ -195,10 +195,9 @@ public void testListEmptyRootDirectory() throws IOException { for (FileStatus status : statuses) { ContractTestUtils.assertDeleted(fs, status.getPath(), false, true, false); } - FileStatus[] rootListStatus = fs.listStatus(root); - assertEquals("listStatus on empty root-directory returned found: " - + join("\n", rootListStatus), - 0, rootListStatus.length); + Assertions.assertThat(fs.listStatus(root)) + .describedAs("ls /") + .hasSize(0); assertNoElements("listFiles(/, false)", fs.listFiles(root, false)); assertNoElements("listFiles(/, true)",