소스 검색

HADOOP-18150. Fix ITestAuditManagerDisabled test in S3A. (#4044)

Contributed by Mehakmeet Singh
Mehakmeet Singh 3 년 전
부모
커밋
6995374b54
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/audit/ITestAuditManagerDisabled.java

+ 4 - 2
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/audit/ITestAuditManagerDisabled.java

@@ -28,9 +28,10 @@ import org.apache.hadoop.fs.s3a.performance.AbstractS3ACostTest;
 
 import static org.apache.hadoop.fs.s3a.audit.AuditTestSupport.NOOP_SPAN;
 import static org.apache.hadoop.fs.s3a.audit.AuditTestSupport.resetAuditOptions;
+import static org.apache.hadoop.fs.s3a.audit.S3AAuditConstants.AUDIT_ENABLED;
 
 /**
- * Verify that by default audit managers are disabled.
+ * Verify that audit managers are disabled if set to false.
  */
 public class ITestAuditManagerDisabled extends AbstractS3ACostTest {
 
@@ -42,11 +43,12 @@ public class ITestAuditManagerDisabled extends AbstractS3ACostTest {
   public Configuration createConfiguration() {
     Configuration conf = super.createConfiguration();
     resetAuditOptions(conf);
+    conf.setBoolean(AUDIT_ENABLED, false);
     return conf;
   }
 
   /**
-   * The default auditor is the no-op auditor.
+   * Verify that the auditor is the no-op auditor if auditing is disabled.
    */
   @Test
   public void testAuditorDisabled() {