Skip to content

Commit 6af4b85

Browse files
committed
fix sync upload when missing checksum from response
1 parent 42c0bf2 commit 6af4b85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/s3-tests/src/it/java/software/amazon/awssdk/services/s3/regression/upload/UploadSyncRegressionTesting.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ void putObject(FlattenUploadConfig config) throws Exception {
8585
recordObjectToCleanup(bucketType, key);
8686

8787
// We only validate when configured to WHEN_SUPPORTED since checksums are optional for PutObject
88-
// CRT switches to MPU under the hood which doesn't support checksums
89-
if (config.getRequestChecksumValidation() == RequestChecksumCalculation.WHEN_SUPPORTED) {
88+
if (config.getRequestChecksumValidation() == RequestChecksumCalculation.WHEN_SUPPORTED
89+
&& response.checksumCRC32() != null) {
9090
assertThat(response.checksumCRC32()).isEqualTo(actualCrc32);
9191
}
9292

0 commit comments

Comments
 (0)