HADOOP-15444 ITestS3GuardToolDynamo should only run with -Ddynamo (Aaron Fabbri)
This commit is contained in:
parent
8cdb032aff
commit
96c843f64b
|
@ -28,6 +28,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import com.amazonaws.services.dynamodbv2.document.DynamoDB;
|
import com.amazonaws.services.dynamodbv2.document.DynamoDB;
|
||||||
import com.amazonaws.services.dynamodbv2.document.Table;
|
import com.amazonaws.services.dynamodbv2.document.Table;
|
||||||
import com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException;
|
import com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException;
|
||||||
|
import org.junit.Assume;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -51,6 +52,14 @@ public class ITestS3GuardToolDynamoDB extends AbstractS3GuardToolTestBase {
|
||||||
return new DynamoDBMetadataStore();
|
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.
|
// Check the existence of a given DynamoDB table.
|
||||||
private static boolean exist(DynamoDB dynamoDB, String tableName) {
|
private static boolean exist(DynamoDB dynamoDB, String tableName) {
|
||||||
assertNotNull(dynamoDB);
|
assertNotNull(dynamoDB);
|
||||||
|
|
Loading…
Reference in New Issue