Skip to content

Commit e269632

Browse files
authored
Adding retryable annotation to the rest of the flaky tets (#6020)
Co-authored-by: Ran Vaknin <[email protected]>
1 parent 3ce1c9d commit e269632

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/protocol-tests/src/test/java/software/amazon/awssdk/protocol/tests/timeout/BaseApiCallAttemptTimeoutTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ public abstract class BaseApiCallAttemptTimeoutTest extends BaseTimeoutTest {
2828
protected static final Duration DELAY_BEFORE_API_CALL_ATTEMPT_TIMEOUT = Duration.ofMillis(50);
2929
protected static final Duration DELAY_AFTER_API_CALL_ATTEMPT_TIMEOUT = Duration.ofMillis(500);
3030

31-
@Test
31+
@RetryableTest(maxRetries = 3)
3232
public void nonstreamingOperation200_finishedWithinTime_shouldSucceed() throws Exception {
3333
stubSuccessResponse(DELAY_BEFORE_API_CALL_ATTEMPT_TIMEOUT);
3434
verifySuccessResponseNotTimedOut();
3535
}
3636

37-
@Test
37+
@RetryableTest(maxRetries = 3)
3838
public void nonstreamingOperation200_notFinishedWithinTime_shouldTimeout() {
3939
stubSuccessResponse(DELAY_AFTER_API_CALL_ATTEMPT_TIMEOUT);
4040
verifyTimedOut();
4141
}
4242

43-
@Test
43+
@RetryableTest(maxRetries = 3)
4444
public void nonstreamingOperation500_finishedWithinTime_shouldNotTimeout() throws Exception {
4545
stubErrorResponse(DELAY_BEFORE_API_CALL_ATTEMPT_TIMEOUT);
4646
verifyFailedResponseNotTimedOut();
@@ -58,13 +58,13 @@ public void streamingOperation_finishedWithinTime_shouldSucceed() throws Excepti
5858
verifySuccessResponseNotTimedOut();
5959
}
6060

61-
@Test
61+
@RetryableTest(maxRetries = 3)
6262
public void streamingOperation_notFinishedWithinTime_shouldTimeout() {
6363
stubSuccessResponse(DELAY_AFTER_API_CALL_ATTEMPT_TIMEOUT);
6464
verifyTimedOut();
6565
}
6666

67-
@Test
67+
@RetryableTest(maxRetries = 3)
6868
public void firstAttemptTimeout_retryFinishWithInTime_shouldNotTimeout() throws Exception {
6969
mockHttpClient().stubResponses(Pair.of(mockResponse(200), DELAY_AFTER_API_CALL_ATTEMPT_TIMEOUT),
7070
Pair.of(mockResponse(200), DELAY_BEFORE_API_CALL_ATTEMPT_TIMEOUT));
@@ -73,15 +73,15 @@ public void firstAttemptTimeout_retryFinishWithInTime_shouldNotTimeout() throws
7373
verifyRequestCount(2);
7474
}
7575

76-
@Test
76+
@RetryableTest(maxRetries = 3)
7777
public void firstAttemptTimeout_retryFinishWithInTime500_shouldNotTimeout() {
7878
mockHttpClient().stubResponses(Pair.of(mockResponse(200), DELAY_AFTER_API_CALL_ATTEMPT_TIMEOUT),
7979
Pair.of(mockResponse(500), DELAY_BEFORE_API_CALL_ATTEMPT_TIMEOUT));
8080
verifyRetraybleFailedResponseNotTimedOut();
8181
verifyRequestCount(2);
8282
}
8383

84-
@Test
84+
@RetryableTest(maxRetries = 3)
8585
public void allAttemptsNotFinishedWithinTime_shouldTimeout() {
8686
stubSuccessResponse(DELAY_AFTER_API_CALL_ATTEMPT_TIMEOUT);
8787
verifyRetryableTimeout();

0 commit comments

Comments
 (0)