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

Contributed by Mehakmeet Singh
This commit is contained in:
Mehakmeet Singh 2022-03-04 00:14:28 +05:30 committed by GitHub
parent 379baa5eb6
commit 6995374b54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,9 +28,10 @@
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 ITestAuditManagerDisabled() {
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() {