From b3de96a5ba0f014b41a61c0c2ff6dd6dd8ed7e1f Mon Sep 17 00:00:00 2001 From: sullis Date: Sat, 2 Nov 2024 12:06:45 -0700 Subject: [PATCH] update TestS3FileIOIntegration.java --- .../iceberg/aws/s3/TestS3FileIOIntegration.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/aws/src/integration/java/org/apache/iceberg/aws/s3/TestS3FileIOIntegration.java b/aws/src/integration/java/org/apache/iceberg/aws/s3/TestS3FileIOIntegration.java index 9d5d41438a62..8d5e50cbec32 100644 --- a/aws/src/integration/java/org/apache/iceberg/aws/s3/TestS3FileIOIntegration.java +++ b/aws/src/integration/java/org/apache/iceberg/aws/s3/TestS3FileIOIntegration.java @@ -18,6 +18,7 @@ */ package org.apache.iceberg.aws.s3; +import static org.apache.iceberg.aws.HttpClientProperties.CLIENT_TYPE; import static org.assertj.core.api.Assertions.assertThat; import java.io.ByteArrayInputStream; @@ -166,6 +167,21 @@ public void testS3FileIOWithS3FileIOAwsClientFactoryImpl() throws Exception { validateRead(s3FileIO); } + @Test + public void testS3FileIOWithS3FileIOAwsClientFactoryImpl_crtClient() throws Exception { + s3.putObject( + PutObjectRequest.builder().bucket(bucketName).key(objectKey).build(), + RequestBody.fromBytes(contentBytes)); + S3FileIO s3FileIO = new S3FileIO(); + Map properties = Maps.newHashMap(); + properties.put(CLIENT_TYPE, "aws-crt"); + properties.put( + S3FileIOProperties.CLIENT_FACTORY, + "org.apache.iceberg.aws.s3.DefaultS3FileIOAwsClientFactory"); + s3FileIO.initialize(properties); + validateRead(s3FileIO); + } + @Test public void testS3FileIOWithDefaultAwsClientFactoryImpl() throws Exception { s3.putObject(