ayushtkn commented on code in PR #4566:
URL: https://github.com/apache/ozone/pull/4566#discussion_r1166090418


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java:
##########
@@ -1678,7 +1678,8 @@ public void testTrash() throws Exception {
     }, 1000, 120000);
 
     // userTrash path will contain the checkpoint folder
-    Assert.assertEquals(1, fs.listStatus(userTrash).length);
+    FileStatus[] statusList = fs.listStatus(userTrash);
+    Assert.assertTrue(1 <= statusList.length);

Review Comment:
   you specifically are checking it isn't 0? listStatus can't return negative 
in any case.
   
   Can we use ``assertNotEquals``? or if there is some other case possible can 
we put ``statusList.length`` in the message, earlier assertEquals would have 
printed statusList.length value in case of a failure 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to