|
30 | 30 | import org.junit.jupiter.params.provider.Arguments;
|
31 | 31 | import org.junit.jupiter.params.provider.MethodSource;
|
32 | 32 | import org.mockito.ArgumentCaptor;
|
| 33 | +import software.amazon.awssdk.awscore.retry.AwsRetryStrategy; |
33 | 34 | import software.amazon.awssdk.metrics.MetricCollection;
|
34 | 35 | import software.amazon.awssdk.metrics.MetricPublisher;
|
35 | 36 | import software.amazon.awssdk.core.metrics.CoreMetric;
|
|
57 | 58 | import software.amazon.awssdk.protocols.core.ExceptionMetadata;
|
58 | 59 | import software.amazon.awssdk.protocols.xml.AwsS3ProtocolFactory;
|
59 | 60 | import software.amazon.awssdk.regions.Region;
|
60 |
| -import software.amazon.awssdk.retries.DefaultRetryStrategy; |
61 | 61 | import software.amazon.awssdk.services.s3.model.GetObjectResponse;
|
62 | 62 | import software.amazon.awssdk.services.s3.model.InvalidObjectStateException;
|
63 | 63 | import software.amazon.awssdk.services.s3.model.NoSuchKeyException;
|
|
69 | 69 | /**
|
70 | 70 | * Tests for {@link DefaultPresignedUrlManager} using MockSyncHttpClient to verify HTTP interactions.
|
71 | 71 | */
|
72 |
| -public class DefaultPresignedUrlManagerTest { |
| 72 | + class DefaultPresignedUrlManagerTest { |
73 | 73 |
|
74 | 74 | private static final String TEST_CONTENT = "test-content";
|
75 | 75 | private static final URI DEFAULT_ENDPOINT = URI.create("https://defaultendpoint.com");
|
@@ -211,7 +211,7 @@ private static Stream<Arguments> additionalTestCases() {
|
211 | 211 | @ParameterizedTest(name = "{0}")
|
212 | 212 | @MethodSource("additionalTestCases")
|
213 | 213 | void given_PresignedUrlManager_when_ExecutingDifferentScenarios_then_ShouldBehaveCorrectly(String testName,
|
214 |
| - String testType) throws IOException { |
| 214 | + String testType) { |
215 | 215 | switch (testType) {
|
216 | 216 | case "CUSTOM_TRANSFORMER":
|
217 | 217 | mockHttpClient.stubNextResponse(createSuccessResponse());
|
@@ -261,7 +261,7 @@ private SdkClientConfiguration getDefaultSdkConfigs() {
|
261 | 261 | .option(SdkClientOption.SYNC_HTTP_CLIENT, mockHttpClient)
|
262 | 262 | .option(SdkClientOption.ADDITIONAL_HTTP_HEADERS, Collections.emptyMap())
|
263 | 263 | .option(SdkClientOption.EXECUTION_INTERCEPTORS, Collections.emptyList())
|
264 |
| - .option(SdkClientOption.RETRY_STRATEGY, DefaultRetryStrategy.doNotRetry()) |
| 264 | + .option(SdkClientOption.RETRY_STRATEGY, AwsRetryStrategy.doNotRetry()) |
265 | 265 | .option(SdkAdvancedClientOption.USER_AGENT_PREFIX, "")
|
266 | 266 | .option(SdkAdvancedClientOption.USER_AGENT_SUFFIX, "")
|
267 | 267 | .option(SdkClientOption.CRC32_FROM_COMPRESSED_DATA_ENABLED, false)
|
|
0 commit comments