Skip to content

Commit e6ac726

Browse files
authored
Tune parameters to reduce intermittent failures in S3 TM pauseAndResume integ test (#6336)
* Fix flaky s3 TM pauseAndResume integ test * Comment out entire test * Tune paramters to reduce flakiness
1 parent 8966845 commit e6ac726

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

services-custom/s3-transfer-manager/src/it/java/software/amazon/awssdk/transfer/s3/S3IntegrationTestBase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public static void setUpForAllIntegTests() throws Exception {
7474
s3CrtAsync = S3CrtAsyncClient.builder()
7575
.credentialsProvider(CREDENTIALS_PROVIDER_CHAIN)
7676
.region(DEFAULT_REGION)
77+
.maxConcurrency(1)
7778
.build();
7879
tmCrt = S3TransferManager.builder()
7980
.s3Client(s3CrtAsync)

services-custom/s3-transfer-manager/src/it/java/software/amazon/awssdk/transfer/s3/S3TransferManagerDownloadPauseResumeIntegrationTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public class S3TransferManagerDownloadPauseResumeIntegrationTest extends S3Integ
5656
private static final Logger log = Logger.loggerFor(S3TransferManagerDownloadPauseResumeIntegrationTest.class);
5757
private static final String BUCKET = temporaryBucketName(S3TransferManagerDownloadPauseResumeIntegrationTest.class);
5858
private static final String KEY = "key";
59-
// 24 * MB is chosen to make sure we have data written in the file already upon pausing.
60-
private static final long OBJ_SIZE = 24 * MB;
59+
// 50 * MB is chosen to make sure we have data written in the file already upon pausing.
60+
private static final long OBJ_SIZE = 50 * MB;
6161
private static File sourceFile;
6262

6363
@BeforeAll
@@ -152,7 +152,6 @@ void pauseAndResume_ObjectNotChanged_shouldResumeDownload(S3TransferManager tm)
152152
assertThat(resumableFileDownload.s3ObjectLastModified()).hasValue(testDownloadListener.getObjectResponse.lastModified());
153153
assertThat(bytesTransferred).isEqualTo(path.toFile().length());
154154
assertThat(resumableFileDownload.totalSizeInBytes()).hasValue(sourceFile.length());
155-
156155
assertThat(bytesTransferred).isLessThan(sourceFile.length());
157156
assertThat(download.completionFuture()).isCancelled();
158157

@@ -242,7 +241,7 @@ private static void waitUntilFirstByteBufferDelivered(FileDownload download) {
242241
.addAcceptor(WaiterAcceptor.retryOnResponseAcceptor(r -> true))
243242
.overrideConfiguration(o -> o.waitTimeout(Duration.ofMinutes(1))
244243
.maxAttempts(Integer.MAX_VALUE)
245-
.backoffStrategy(FixedDelayBackoffStrategy.create(Duration.ofMillis(100))))
244+
.backoffStrategy(FixedDelayBackoffStrategy.create(Duration.ofMillis(10))))
246245
.build();
247246
waiter.run(() -> download.progress().snapshot());
248247
}

0 commit comments

Comments
 (0)