Skip to content

Commit 22282d6

Browse files
HADOOP-19037. AWS SDK v2: ITestS3AConfiguration failing with region problems (#6486)
Stop test STS client relying on SDK region resolution Contributed by Shintaro Onuma <[email protected]>
1 parent 5b15b8d commit 22282d6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AConfiguration.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ public class ITestS3AConfiguration extends AbstractHadoopTestBase {
9292
private static final String AP_ILLEGAL_ACCESS =
9393
"ARN of type accesspoint cannot be passed as a bucket";
9494

95+
private static final String US_EAST_1 = "us-east-1";
96+
97+
private static final String STS_ENDPOINT = "sts.us-east-1.amazonaws.com";
98+
9599
private Configuration conf;
96100
private S3AFileSystem fs;
97101

@@ -625,8 +629,9 @@ public void testS3SpecificSignerOverride() throws Exception {
625629

626630
final String bucket = fs.getBucket();
627631
StsClient stsClient =
628-
STSClientFactory.builder(config, bucket, new AnonymousAWSCredentialsProvider(), "",
629-
"").build();
632+
STSClientFactory.builder(config, bucket, new AnonymousAWSCredentialsProvider(),
633+
STS_ENDPOINT, US_EAST_1).build();
634+
630635

631636
intercept(StsException.class, "", () ->
632637
stsClient.getSessionToken());

0 commit comments

Comments
 (0)