Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zoewangg committed Aug 3, 2023
1 parent 32ddd19 commit 28c126d
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import static org.mockito.Mockito.when;

import java.util.List;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand All @@ -49,10 +48,7 @@
import software.amazon.awssdk.services.s3.model.NoSuchBucketException;
import software.amazon.awssdk.services.s3.model.UploadPartCopyRequest;
import software.amazon.awssdk.services.s3.model.UploadPartCopyResponse;
import software.amazon.awssdk.utils.BinaryUtils;
import software.amazon.awssdk.utils.CompletableFutureUtils;
import software.amazon.awssdk.utils.Md5Utils;

class CopyObjectHelperTest {

private static final String SOURCE_BUCKET = "source";
Expand All @@ -66,7 +62,7 @@ class CopyObjectHelperTest {
private CopyObjectHelper copyHelper;

private static final long PART_SIZE = 1024L;
private static final long UPLOAD_THRESHOLD = 2048L;
private static final long UPLOAD_THRESHOLD = PART_SIZE * 2;

@BeforeEach
public void setUp() {
Expand Down Expand Up @@ -284,6 +280,7 @@ void multiPartCopy_contentSizeExceeds10000Parts_shouldAdjustPartSize() {
}
}


@Test
public void multiPartCopy_sseCHeadersSetInOriginalRequest_includedInCompleteMultipart() {
String customerAlgorithm = "algorithm";
Expand All @@ -294,7 +291,7 @@ public void multiPartCopy_sseCHeadersSetInOriginalRequest_includedInCompleteMult
.sseCustomerKey(customerKey)
.sseCustomerKeyMD5(customerKeyMd5));

stubSuccessfulHeadObjectCall(2 * PART_SIZE_BYTES);
stubSuccessfulHeadObjectCall(3 * PART_SIZE_BYTES);
stubSuccessfulCreateMulipartCall();
stubSuccessfulUploadPartCopyCalls();
stubSuccessfulCompleteMultipartCall();
Expand Down

0 comments on commit 28c126d

Please sign in to comment.