HADOOP-18150. Fix ITestAuditManagerDisabled test in S3A. (#4044)
Contributed by Mehakmeet Singh Change-Id: I25c10844e4ad64b1fd7af9a02018220a611c85e0
This commit is contained in:
parent
d7c375da40
commit
909048d87d
@ -28,9 +28,10 @@
|
|||||||
|
|
||||||
import static org.apache.hadoop.fs.s3a.audit.AuditTestSupport.NOOP_SPAN;
|
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.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 {
|
public class ITestAuditManagerDisabled extends AbstractS3ACostTest {
|
||||||
|
|
||||||
@ -42,11 +43,12 @@ public ITestAuditManagerDisabled() {
|
|||||||
public Configuration createConfiguration() {
|
public Configuration createConfiguration() {
|
||||||
Configuration conf = super.createConfiguration();
|
Configuration conf = super.createConfiguration();
|
||||||
resetAuditOptions(conf);
|
resetAuditOptions(conf);
|
||||||
|
conf.setBoolean(AUDIT_ENABLED, false);
|
||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default auditor is the no-op auditor.
|
* Verify that the auditor is the no-op auditor if auditing is disabled.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testAuditorDisabled() {
|
public void testAuditorDisabled() {
|
||||||
|
Loading…
Reference in New Issue
Block a user