nastra commented on code in PR #12758:
URL: https://github.com/apache/iceberg/pull/12758#discussion_r2037659917


##########
aws/src/test/java/org/apache/iceberg/aws/TestAwsClientFactories.java:
##########
@@ -56,6 +56,47 @@ public void testLoadDefault() {
         .isInstanceOf(AwsClientFactories.DefaultAwsClientFactory.class);
   }
 
+  @Test
+  public void testS3AsyncClientCrtEnabledTrue() {
+    Map<String, String> properties = Maps.newHashMap();
+    properties.put(S3FileIOProperties.ACCESS_KEY_ID, "keyId");
+    properties.put(S3FileIOProperties.SECRET_ACCESS_KEY, "accessKey");
+    properties.put(S3FileIOProperties.S3_CRT_ENABLED, "true");
+    properties.put(AwsClientProperties.CLIENT_REGION, "us-east-1");
+
+    AwsClientFactory clientFactory = AwsClientFactories.from(properties);
+    S3AsyncClient s3AsyncClient = clientFactory.s3Async();
+    assertThat(s3AsyncClient.getClass().getName())

Review Comment:
   I would probably just simplify this a bit and also use an instanceof check 
instead of comparing the actual class name:
   
   ```
   assertThat(
               AwsClientFactories.from(
                       ImmutableMap.of(
                           S3FileIOProperties.ACCESS_KEY_ID,
                           "keyId",
                           S3FileIOProperties.SECRET_ACCESS_KEY,
                           "accessKey",
                           S3FileIOProperties.S3_CRT_ENABLED,
                           "true",
                           AwsClientProperties.CLIENT_REGION,
                           "us-east-1"))
                   .s3Async())
           .isInstanceOf(DefaultS3CrtAsyncClient.class);
   ```



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

Reply via email to