You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/11/06 03:16:03 UTC

[GitHub] [hadoop] ferhui commented on a change in pull request #2437: HDFS-15667. Audit log record the unexpected allowed result when delete

ferhui commented on a change in pull request #2437:
URL: https://github.com/apache/hadoop/pull/2437#discussion_r518500077



##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLoggerWithCommands.java
##########
@@ -1205,6 +1205,18 @@ public void testGetDatanodeStorageReport() throws Exception {
     }
   }
 
+  @Test
+  public void testDeleteRoot() throws Exception {
+    Path srcDir = new Path("/");
+    fileSys = DFSTestUtil.getFileSystemAs(user1, conf);
+    boolean result = fileSys.delete(srcDir, true);
+    fileSys.close();
+    assertTrue(result == false);

Review comment:
       As CI reports, it could be more simple here, assertFalse(result)?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org