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: [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