jianghuazhu commented on a change in pull request #2281:
URL: https://github.com/apache/hadoop/pull/2281#discussion_r489120569
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogger.java
##########
@@ -231,6 +232,30 @@ public void testAuditLoggerWithSetPermission() throws
IOException {
}
}
+ @Test
+ public void testAuditLoggerWithCreateFlag() throws IOException {
+ final Configuration conf = new HdfsConfiguration();
+ final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
+ LogCapturer auditlog = LogCapturer.captureLogs(FSNamesystem.auditLog);
+ try {
+ cluster.waitClusterUp();
+ auditlog.clearOutput();
+ final FileSystem fs = cluster.getFileSystem();
+ final Path p = new Path("/debug.log");
+ FSDataOutputStream stm = fs.create(p);
+ assertTrue(auditlog.getOutput().contains("create(options"));
Review comment:
thanks for your suggestion.
I will modify it.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]