File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/test/java/software/amazon/encryption/s3 Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3535import javax .crypto .AEADBadTagException ;
3636import javax .crypto .KeyGenerator ;
3737import javax .crypto .SecretKey ;
38+ import java .io .BufferedInputStream ;
3839import java .io .IOException ;
3940import java .io .InputStream ;
4041import java .nio .charset .StandardCharsets ;
@@ -342,7 +343,9 @@ public void customSetBufferSizeWithLargeObject() throws IOException {
342343
343344 // Tight bound on the custom buffer size limit of 32MiB
344345 final long fileSizeExceedingDefaultLimit = 1024 * 1024 * 32 + 1 ;
345- final InputStream largeObjectStream = new BoundedInputStream (fileSizeExceedingDefaultLimit );
346+ final InputStream rawStream = new BoundedInputStream (fileSizeExceedingDefaultLimit );
347+ final BufferedInputStream largeObjectStream = new BufferedInputStream (rawStream );
348+
346349 v3ClientWithBuffer32MiB .putObject (PutObjectRequest .builder ()
347350 .bucket (BUCKET )
348351 .key (objectKey )
@@ -361,7 +364,7 @@ public void customSetBufferSizeWithLargeObject() throws IOException {
361364 .key (objectKey ));
362365
363366
364- assertTrue (IOUtils .contentEquals (new BoundedInputStream (fileSizeExceedingDefaultLimit ), response ));
367+ assertTrue (IOUtils .contentEquals (new BufferedInputStream ( new BoundedInputStream (fileSizeExceedingDefaultLimit ) ), response ));
365368 response .close ();
366369
367370 // Cleanup
You can’t perform that action at this time.
0 commit comments