hemantk-12 commented on code in PR #5217:
URL: https://github.com/apache/ozone/pull/5217#discussion_r1309119690


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java:
##########
@@ -1627,19 +1633,19 @@ public void testRenameToTrashEnabled() throws Exception 
{
       stream.write(1);
     }
 
-    // Call moveToTrash. We can't call protected fs.rename() directly
-    trash.moveToTrash(path);
-
     // Construct paths
     String username = UserGroupInformation.getCurrentUser().getShortUserName();
     Path userTrash = new Path(TRASH_ROOT, username);
-    Path userTrashCurrent = new Path(userTrash, "Current");
-    Path trashPath = new Path(userTrashCurrent, testKeyName);
 
-    // Trash Current directory should still have been created.
-    Assert.assertTrue(o3fs.exists(userTrashCurrent));
-    // Check under trash, the key should be present
-    Assert.assertTrue(o3fs.exists(trashPath));
+    Assert.assertFalse(o3fs.exists(userTrash));
+    // Call moveToTrash. We can't call protected fs.rename() directly
+    trash.moveToTrash(path);
+    // We can safely assert only trash directory here.
+    // Asserting Current or checkpoint directory is not feasible here in this
+    // test due to independent TrashEmptier thread running in cluster and
+    // possible flakyness is hard to avoid unless we test this test case

Review Comment:
   ```suggestion
       // possible flakiness is hard to avoid unless we test this test case
   ```



-- 
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