Skip to content

Commit 97f79a1

Browse files
author
Anirav Kareddy
committed
modified customSetBufferSizeWithLargeObjectAsyncClient test case
1 parent d6b4a4c commit 97f79a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/software/amazon/encryption/s3/S3EncryptionClientStreamTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ public void customSetBufferSizeWithLargeObjectAsyncClient() throws IOException {
403403

404404
// Tight bound on the custom buffer size limit of 32MiB
405405
final long fileSizeExceedingDefaultLimit = 1024 * 1024 * 32 + 1;
406-
final InputStream largeObjectStream = new BoundedInputStream(fileSizeExceedingDefaultLimit);
406+
final InputStream rawStream = new BoundedInputStream(fileSizeExceedingDefaultLimit);
407+
final BufferedInputStream largeObjectStream = new BufferedInputStream(rawStream);
407408
ExecutorService singleThreadExecutor = Executors.newSingleThreadExecutor();
408409
CompletableFuture<PutObjectResponse> futurePut = v3ClientWithBuffer32MiB.putObject(PutObjectRequest.builder()
409410
.bucket(BUCKET)
@@ -430,7 +431,7 @@ public void customSetBufferSizeWithLargeObjectAsyncClient() throws IOException {
430431
.key(objectKey), AsyncResponseTransformer.toBlockingInputStream());
431432
ResponseInputStream<GetObjectResponse> output = futureGet.join();
432433

433-
assertTrue(IOUtils.contentEquals(new BoundedInputStream(fileSizeExceedingDefaultLimit), output));
434+
assertTrue(IOUtils.contentEquals(new BufferedInputStream(new BoundedInputStream(fileSizeExceedingDefaultLimit)), output));
434435
output.close();
435436

436437
// Cleanup

0 commit comments

Comments
 (0)