diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/s3guard/ITestS3GuardToolDynamoDB.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/s3guard/ITestS3GuardToolDynamoDB.java index c7dffd267a..821bba5642 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/s3guard/ITestS3GuardToolDynamoDB.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/s3guard/ITestS3GuardToolDynamoDB.java @@ -28,6 +28,7 @@ import com.amazonaws.services.dynamodbv2.document.DynamoDB; import com.amazonaws.services.dynamodbv2.document.Table; import com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException; +import org.junit.Assume; import org.junit.Test; import org.apache.hadoop.conf.Configuration; @@ -51,6 +52,14 @@ protected MetadataStore newMetadataStore() { return new DynamoDBMetadataStore(); } + @Override + public void setup() throws Exception { + super.setup(); + Assume.assumeTrue("Test only applies when DynamoDB is used for S3Guard", + getConfiguration().get(Constants.S3_METADATA_STORE_IMPL).equals( + Constants.S3GUARD_METASTORE_DYNAMO)); + } + // Check the existence of a given DynamoDB table. private static boolean exist(DynamoDB dynamoDB, String tableName) { assertNotNull(dynamoDB);