24
24
import static org .mockito .Mockito .when ;
25
25
26
26
import java .util .List ;
27
- import java .util .Random ;
28
27
import java .util .concurrent .CompletableFuture ;
29
28
import org .junit .jupiter .api .BeforeEach ;
30
29
import org .junit .jupiter .api .Test ;
49
48
import software .amazon .awssdk .services .s3 .model .NoSuchBucketException ;
50
49
import software .amazon .awssdk .services .s3 .model .UploadPartCopyRequest ;
51
50
import software .amazon .awssdk .services .s3 .model .UploadPartCopyResponse ;
52
- import software .amazon .awssdk .utils .BinaryUtils ;
53
51
import software .amazon .awssdk .utils .CompletableFutureUtils ;
54
- import software .amazon .awssdk .utils .Md5Utils ;
55
-
56
52
class CopyObjectHelperTest {
57
53
58
54
private static final String SOURCE_BUCKET = "source" ;
@@ -66,7 +62,7 @@ class CopyObjectHelperTest {
66
62
private CopyObjectHelper copyHelper ;
67
63
68
64
private static final long PART_SIZE = 1024L ;
69
- private static final long UPLOAD_THRESHOLD = 2048L ;
65
+ private static final long UPLOAD_THRESHOLD = PART_SIZE * 2 ;
70
66
71
67
@ BeforeEach
72
68
public void setUp () {
@@ -284,6 +280,7 @@ void multiPartCopy_contentSizeExceeds10000Parts_shouldAdjustPartSize() {
284
280
}
285
281
}
286
282
283
+
287
284
@ Test
288
285
public void multiPartCopy_sseCHeadersSetInOriginalRequest_includedInCompleteMultipart () {
289
286
String customerAlgorithm = "algorithm" ;
@@ -294,7 +291,7 @@ public void multiPartCopy_sseCHeadersSetInOriginalRequest_includedInCompleteMult
294
291
.sseCustomerKey (customerKey )
295
292
.sseCustomerKeyMD5 (customerKeyMd5 ));
296
293
297
- stubSuccessfulHeadObjectCall (2 * PART_SIZE_BYTES );
294
+ stubSuccessfulHeadObjectCall (3 * PART_SIZE_BYTES );
298
295
stubSuccessfulCreateMulipartCall ();
299
296
stubSuccessfulUploadPartCopyCalls ();
300
297
stubSuccessfulCompleteMultipartCall ();
0 commit comments