HADOOP-15444 ITestS3GuardToolDynamo should only run with -Ddynamo (Aaron Fabbri)
This commit is contained in:
parent
8cdb032aff
commit
96c843f64b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user