Skip to content

Commit f2eae2e

Browse files
committed
fix S3MultipartClientGetObjectWiremockTest
1 parent ea2f6aa commit f2eae2e

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

services/s3/src/test/java/software/amazon/awssdk/services/s3/internal/multipart/S3MultipartClientGetObjectWiremockTest.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ public <T> void errorOnThirdPart_shouldCompleteExceptionallyOnlyPartsGreaterThan
147147
}
148148
}
149149

150-
// todo temporary, remove when support for resume is added to multipart file download
151-
// @ParameterizedTest
152-
// @MethodSource("partSizeAndTransformerParams")
150+
@ParameterizedTest
151+
@MethodSource("partSizeAndTransformerParams")
153152
public <T> void partCountValidationFailure_shouldThrowException(
154153
AsyncResponseTransformerTestSupplier<T> supplier,
155154
int partSize) {
@@ -176,7 +175,11 @@ public <T> void partCountValidationFailure_shouldThrowException(
176175

177176
// Skip the lazy transformer since the error won't surface unless the content is consumed
178177
AsyncResponseTransformer<GetObjectResponse, T> transformer = supplier.transformer();
179-
if (transformer instanceof InputStreamResponseTransformer || transformer instanceof PublisherAsyncResponseTransformer) {
178+
if (transformer instanceof InputStreamResponseTransformer
179+
|| transformer instanceof PublisherAsyncResponseTransformer
180+
// FileAsyncResponseTransformer will be used with ParallelMultipartDownloaderSubscriber for which this test logic
181+
// doesn't work
182+
|| transformer instanceof FileAsyncResponseTransformer) {
180183
return;
181184
}
182185

@@ -291,15 +294,17 @@ private static Stream<Arguments> partSizeAndTransformerParams() {
291294
}
292295

293296

297+
298+
294299
/**
295300
* Testing response transformers that are not retryable when
296301
* {@link AsyncResponseTransformer#split(SplittingTransformerConfiguration)} is invoked and used with
297-
* {@link SplittingTransformer} - {@link PublisherAsyncResponseTransformer}, {@link InputStreamResponseTransformer}, and
298-
* {@link FileAsyncResponseTransformer}
302+
* {@link SplittingTransformer} - {@link PublisherAsyncResponseTransformer}, {@link InputStreamResponseTransformer}
299303
* <p>
300304
*
301-
* Retry for multipart download is supported for {@link ByteArrayAsyncResponseTransformer}, tested in
302-
* {@link S3MultipartClientGetObjectRetryBehaviorWiremockTest}.
305+
* Retry for multipart download is supported for {@link ByteArrayAsyncResponseTransformer}
306+
* and {@link FileAsyncResponseTransformer}, tested in {@link S3MultipartClientGetObjectRetryBehaviorWiremockTest} and
307+
* {@link S3MultipartFileDownloadWiremockTest} respectively.
303308
*/
304309
private static Stream<AsyncResponseTransformerTestSupplier<?>> nonRetryableResponseTransformers() {
305310
return Stream.of(new AsyncResponseTransformerTestSupplier.InputStreamArtSupplier(),

0 commit comments

Comments
 (0)