Skip to content

Commit fbc3b88

Browse files
authored
Add Retryable Test annotation (#5999)
Co-authored-by: Ran Vaknin <[email protected]>
1 parent 1b21f02 commit fbc3b88

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919

2020
import java.time.Duration;
2121
import org.junit.jupiter.api.Test;
22+
import software.amazon.awssdk.testutils.retry.RetryableTest;
2223
import software.amazon.awssdk.utils.Pair;
2324

2425
public abstract class BaseApiCallAttemptTimeoutTest extends BaseTimeoutTest {
2526

2627
protected static final Duration API_CALL_ATTEMPT_TIMEOUT = Duration.ofMillis(100);
2728
protected static final Duration DELAY_BEFORE_API_CALL_ATTEMPT_TIMEOUT = Duration.ofMillis(50);
28-
protected static final Duration DELAY_AFTER_API_CALL_ATTEMPT_TIMEOUT = Duration.ofMillis(150);
29+
protected static final Duration DELAY_AFTER_API_CALL_ATTEMPT_TIMEOUT = Duration.ofMillis(500);
2930

3031
@Test
3132
public void nonstreamingOperation200_finishedWithinTime_shouldSucceed() throws Exception {
@@ -45,13 +46,13 @@ public void nonstreamingOperation500_finishedWithinTime_shouldNotTimeout() throw
4546
verifyFailedResponseNotTimedOut();
4647
}
4748

48-
@Test
49+
@RetryableTest(maxRetries = 3)
4950
public void nonstreamingOperation500_notFinishedWithinTime_shouldTimeout() {
5051
stubErrorResponse(DELAY_AFTER_API_CALL_ATTEMPT_TIMEOUT);
5152
verifyTimedOut();
5253
}
5354

54-
@Test
55+
@RetryableTest(maxRetries = 3)
5556
public void streamingOperation_finishedWithinTime_shouldSucceed() throws Exception {
5657
stubSuccessResponse(DELAY_BEFORE_API_CALL_ATTEMPT_TIMEOUT);
5758
verifySuccessResponseNotTimedOut();

0 commit comments

Comments
 (0)