ayushtkn commented on code in PR #5578: URL: https://github.com/apache/hadoop/pull/5578#discussion_r1174097084
########## hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractRootDirectoryTest.java: ########## @@ -197,7 +197,7 @@ public void testListEmptyRootDirectory() throws IOException { } FileStatus[] rootListStatus = fs.listStatus(root); assertEquals("listStatus on empty root-directory returned found: " - + join("\n", rootListStatus), + + join(rootListStatus, "\n"), 0, rootListStatus.length); Review Comment: Can we do this? rather than normal joins ``` Assertions.assertThat(rootListStatus).hasSize(0); ``` It does give similar trace and looks better :) ``` java.lang.AssertionError: Expected size:<0> but was:<1> in: <[HdfsLocatedFileStatus{path=hdfs://localhost:51193/test; isDirectory=true; modification_time=1682104954707; access_time=0; owner=ayushsaxena; group=supergroup; permission=rwxr-xr-x; isSymlink=false; hasAcl=false; isEncrypted=false; isErasureCoded=false}]> ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org