Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public static void setUpForAllIntegTests() throws Exception {
s3CrtAsync = S3CrtAsyncClient.builder()
.credentialsProvider(CREDENTIALS_PROVIDER_CHAIN)
.region(DEFAULT_REGION)
.maxConcurrency(1)
.build();
tmCrt = S3TransferManager.builder()
.s3Client(s3CrtAsync)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public class S3TransferManagerDownloadPauseResumeIntegrationTest extends S3Integ
private static final Logger log = Logger.loggerFor(S3TransferManagerDownloadPauseResumeIntegrationTest.class);
private static final String BUCKET = temporaryBucketName(S3TransferManagerDownloadPauseResumeIntegrationTest.class);
private static final String KEY = "key";
// 24 * MB is chosen to make sure we have data written in the file already upon pausing.
private static final long OBJ_SIZE = 24 * MB;
// 50 * MB is chosen to make sure we have data written in the file already upon pausing.
private static final long OBJ_SIZE = 50 * MB;
private static File sourceFile;

@BeforeAll
Expand Down Expand Up @@ -152,8 +152,7 @@ void pauseAndResume_ObjectNotChanged_shouldResumeDownload(S3TransferManager tm)
assertThat(resumableFileDownload.s3ObjectLastModified()).hasValue(testDownloadListener.getObjectResponse.lastModified());
assertThat(bytesTransferred).isEqualTo(path.toFile().length());
assertThat(resumableFileDownload.totalSizeInBytes()).hasValue(sourceFile.length());

assertThat(bytesTransferred).isLessThan(sourceFile.length());
assertThat(bytesTransferred).isLessThanOrEqualTo(sourceFile.length());
assertThat(download.completionFuture()).isCancelled();

log.debug(() -> "Resuming download ");
Expand Down Expand Up @@ -242,7 +241,7 @@ private static void waitUntilFirstByteBufferDelivered(FileDownload download) {
.addAcceptor(WaiterAcceptor.retryOnResponseAcceptor(r -> true))
.overrideConfiguration(o -> o.waitTimeout(Duration.ofMinutes(1))
.maxAttempts(Integer.MAX_VALUE)
.backoffStrategy(FixedDelayBackoffStrategy.create(Duration.ofMillis(100))))
.backoffStrategy(FixedDelayBackoffStrategy.create(Duration.ofMillis(10))))
.build();
waiter.run(() -> download.progress().snapshot());
}
Expand Down