Skip to content

Commit cf225b2

Browse files
committed
Implement apiCallAttemptTimeout and apiCallTimeout feature for asynchrounous calls.
1 parent 4a8bea6 commit cf225b2

File tree

56 files changed

+2045
-1244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2045
-1244
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "AWS SDK for Java v2",
3+
"type": "feature",
4+
"description": "Implement apiCallAttemptTimeout and apiCallTimeout feature for asynchrounous calls. Customers can specify timeout via `ClientOverrideConfiguaration.Builder#apiCallTimeout(Duration)` or `RequestOverrideConfiguration.Builder#apiCallAttemptTimeout(Duration)`. Note: this feature is only implemented for asynchrounous api calls."
5+
}

core/aws-core/src/test/java/software/amazon/awssdk/awscore/client/utils/HttpTestUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static SdkClientConfiguration testClientConfiguration() {
5656
.option(SdkAdvancedClientOption.USER_AGENT_PREFIX, "")
5757
.option(SdkAdvancedClientOption.USER_AGENT_SUFFIX, "")
5858
.option(SdkAdvancedAsyncClientOption.FUTURE_COMPLETION_EXECUTOR, Runnable::run)
59-
.option(SdkClientOption.ASYNC_RETRY_EXECUTOR_SERVICE, Executors.newScheduledThreadPool(1))
59+
.option(SdkClientOption.SCHEDULED_EXECUTOR_SERVICE, Executors.newScheduledThreadPool(1))
6060
.build();
6161
}
6262

core/sdk-core/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@
164164
<artifactId>hamcrest-core</artifactId>
165165
<scope>test</scope>
166166
</dependency>
167+
<dependency>
168+
<groupId>software.amazon.awssdk</groupId>
169+
<artifactId>netty-nio-client</artifactId>
170+
<version>${awsjavasdk.version}</version>
171+
<scope>test</scope>
172+
</dependency>
167173
</dependencies>
168174
<build>
169175
<resources>

core/sdk-core/src/it/java/software/amazon/awssdk/core/http/timers/client/AbortedExceptionClientExecutionTimerIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.mockito.runners.MockitoJUnitRunner;
3737
import software.amazon.awssdk.annotations.ReviewBeforeRelease;
3838
import software.amazon.awssdk.core.exception.AbortedException;
39-
import software.amazon.awssdk.core.exception.ClientExecutionTimeoutException;
39+
import software.amazon.awssdk.core.exception.ApiCallTimeoutException;
4040
import software.amazon.awssdk.core.exception.SdkClientException;
4141
import software.amazon.awssdk.core.http.ExecutionContext;
4242
import software.amazon.awssdk.core.http.MockServerTestBase;
@@ -90,7 +90,7 @@ public void clientExecutionTimeoutEnabled_aborted_exception_occurs_timeout_not_e
9090
execute(httpClient, createMockGetRequest());
9191
}
9292

93-
@Test(expected = ClientExecutionTimeoutException.class)
93+
@Test(expected = ApiCallTimeoutException.class)
9494
public void clientExecutionTimeoutEnabled_aborted_exception_occurs_timeout_expired() throws Exception {
9595
// Simulate a slow HTTP request
9696
when(abortableCallable.call()).thenAnswer(i -> {

core/sdk-core/src/it/java/software/amazon/awssdk/core/http/timers/client/DummyErrorResponseServerIntegrationTests.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

core/sdk-core/src/it/java/software/amazon/awssdk/core/http/timers/client/DummySuccessfulResponseServerIntegrationTests.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

core/sdk-core/src/it/java/software/amazon/awssdk/core/http/timers/client/UnresponsiveServerIntegrationTests.java

Lines changed: 0 additions & 147 deletions
This file was deleted.

0 commit comments

Comments
 (0)