Skip to content

Commit

Permalink
HADOOP-19072. S3A: Override fs.s3a.performance.flags for tests (ADDEN…
Browse files Browse the repository at this point in the history
…DUM) (#6985)


This is a followup to #6543 which ensures all test pass in configurations where 
fs.s3a.performance.flags is set to "*" or contains "mkdirs"

Contributed by VJ Jasani
  • Loading branch information
virajjasani authored Aug 12, 2024
1 parent 321a6cc commit 74ff007
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.hadoop.fs.contract.AbstractFSContract;

import static org.apache.hadoop.fs.s3a.Constants.FS_S3A_CREATE_PERFORMANCE;
import static org.apache.hadoop.fs.s3a.Constants.FS_S3A_PERFORMANCE_FLAGS;
import static org.apache.hadoop.fs.s3a.S3ATestUtils.removeBaseAndBucketOverrides;

/**
Expand All @@ -33,8 +34,11 @@ public class ITestS3AContractMkdir extends AbstractContractMkdirTest {
@Override
protected Configuration createConfiguration() {
Configuration conf = super.createConfiguration();
removeBaseAndBucketOverrides(conf,
FS_S3A_CREATE_PERFORMANCE);
removeBaseAndBucketOverrides(
conf,
FS_S3A_CREATE_PERFORMANCE,
FS_S3A_PERFORMANCE_FLAGS);
conf.set(FS_S3A_PERFORMANCE_FLAGS, "");
return conf;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.junit.Before;

import static org.apache.hadoop.fs.s3a.Constants.FS_S3A_CREATE_PERFORMANCE;
import static org.apache.hadoop.fs.s3a.Constants.FS_S3A_PERFORMANCE_FLAGS;
import static org.apache.hadoop.fs.s3a.S3ATestUtils.removeBaseAndBucketOverrides;

/**
Expand All @@ -32,7 +33,8 @@ public void setUp() throws Exception {
Configuration conf = new Configuration();
removeBaseAndBucketOverrides(
conf,
FS_S3A_CREATE_PERFORMANCE);
FS_S3A_CREATE_PERFORMANCE,
FS_S3A_PERFORMANCE_FLAGS);
fc = S3ATestUtils.createTestFileContext(conf);
super.setUp();
}
Expand Down

0 comments on commit 74ff007

Please sign in to comment.