Skip to content

Commit

Permalink
chore: properly build and autoclose s3 client
Browse files Browse the repository at this point in the history
  • Loading branch information
jeqo committed Sep 26, 2023
1 parent 7f07910 commit 86ec15f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ static void setupS3() {
LOCALSTACK.getSecretKey()
)
)
)
.build();
final S3Client s3Client = clientBuilder.build();
s3Client.createBucket(CreateBucketRequest.builder().bucket(BUCKET_NAME).build());
);
try (final S3Client s3Client = clientBuilder.build()) {
s3Client.createBucket(CreateBucketRequest.builder().bucket(BUCKET_NAME).build());
}
}

@BeforeEach
Expand Down

0 comments on commit 86ec15f

Please sign in to comment.