Skip to content

Commit

Permalink
update TestS3FileIOIntegration.java
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis committed Nov 2, 2024
1 parent 36d46f4 commit b3de96a
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String, String> 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(
Expand Down

0 comments on commit b3de96a

Please sign in to comment.