JonasJ-ap commented on code in PR #5784:
URL: https://github.com/apache/iceberg/pull/5784#discussion_r973655588


##########
aws/src/integration/java/org/apache/iceberg/aws/TestDefaultAwsClientFactory.java:
##########
@@ -67,7 +67,7 @@ public void testS3FileIoCredentialsOverride() {
     AssertHelpers.assertThrows("Should fail request because of bad access key",
         S3Exception.class,
         "The AWS Access Key Id you provided does not exist in our records",
-        () -> 
s3Client.getObject(GetObjectRequest.builder().bucket("bucket").key("key").build()));
+        () -> 
s3Client.getObject(GetObjectRequest.builder().bucket(AwsIntegTestUtil.testBucketName()).key("key").build()));

Review Comment:
   If the bucket named "bucket" does not exist on the user's account or not 
created at the region specified by the user for this test, this test will throw 
an error message like:
   ```
   The bucket you are attempting to access must be addressed using the 
specified endpoint.....
   ```
   Hence, I think we should use the bucket specified by the user instead to 
ensure the desired Exception is caught by the assertion statement



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to