Skip to content

Commit 741026c

Browse files
committed
Fix flaky test pause_fileChanged_resumeShouldStartFromBeginning
1 parent f8cacce commit 741026c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ void pause_fileChanged_resumeShouldStartFromBeginning(S3TransferManager uploadTm
167167
FileUpload resumedUpload = resumeTm.resumeUploadFile(resumableFileUpload);
168168
resumedUpload.completionFuture().join();
169169
verifyMultipartUploadIdNotExist(resumableFileUpload);
170-
assertThat(resumedUpload.progress().snapshot().totalBytes()).hasValue(bytes.length);
170+
171+
// Verify via S3 instead of progress snapshot, which may be empty for cross-TM resume
172+
long actualLength = s3.headObject(b -> b.bucket(BUCKET).key(KEY)).contentLength();
173+
assertThat(actualLength).isEqualTo(bytes.length);
171174
} finally {
172175
Files.write(largeFile.toPath(), originalBytes);
173176
}

0 commit comments

Comments
 (0)