File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/test/java/software/amazon/encryption/s3 Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments