nastra commented on code in PR #13118: URL: https://github.com/apache/iceberg/pull/13118#discussion_r2101817664
########## aws/src/integration/java/org/apache/iceberg/aws/s3/TestS3FileIO.java: ########## @@ -719,6 +723,84 @@ public void multipleStorageCredentialsConfigured() { .hasMessage("Invalid S3 Credentials: only one S3 credential should exist"); } + @Test + public void initFileIOWithoutCredentials() { + S3FileIO fileIO = new S3FileIO(); + fileIO.initialize(ImmutableMap.of("client.region", "us-east-1")); + + S3ServiceClientConfiguration actualConfiguration = fileIO.client().serviceClientConfiguration(); + assertThat(actualConfiguration).isNotNull(); + try { + actualConfiguration.credentialsProvider().resolveIdentity(); + } catch (SdkClientException e) { Review Comment: please use `assertThatThrownBy(..).isInstanceOf(..).hasMessage(..)` instead of a try-catch block -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org