From 4c3324ca1acc4de2ebbb4506836f720340626b97 Mon Sep 17 00:00:00 2001 From: Mukund Thakur Date: Wed, 21 Oct 2020 17:31:13 +0530 Subject: [PATCH] HADOOP-17305. Fix ITestCustomSigner to work with s3 compatible endpoints (#2395) Contributed by Mukund Thakur Change-Id: Ia5def405056691c349cf05530fd3172047d2058b --- .../org/apache/hadoop/fs/s3a/auth/ITestCustomSigner.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestCustomSigner.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestCustomSigner.java index 2e13deb81c..d9cb1d97bf 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestCustomSigner.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestCustomSigner.java @@ -133,11 +133,7 @@ private Configuration createTestConfig(String identifier) { } private String determineRegion(String bucketName) throws IOException { - AmazonS3 s3 = AmazonS3ClientBuilder.standard().withCredentials( - new SimpleAWSCredentialsProvider(null, createConfiguration())) - .withForceGlobalBucketAccessEnabled(true).withRegion("us-east-1") - .build(); - String region = s3.getBucketLocation(bucketName); + String region = getFileSystem().getBucketLocation(bucketName); return fixBucketRegion(region); }