File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/utils
test/codegen-generated-classes-test/src/test/java/software/amazon/awssdk/services/retry Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ public void logBackingOff(Duration backoffDelay) {
146146 */
147147 public SdkHttpFullRequest requestToSend () {
148148 return request .toBuilder ()
149- .putHeader (SDK_RETRY_INFO_HEADER , "attempt=" + attemptNumber + "; max=" + retryPolicy .numRetries ())
149+ .putHeader (SDK_RETRY_INFO_HEADER , "attempt=" + attemptNumber + "; max=" + ( retryPolicy .numRetries () + 1 ))
150150 .build ();
151151 }
152152
Original file line number Diff line number Diff line change 146146 <exec-maven-plugin .version>1.6.0</exec-maven-plugin .version>
147147 <maven-deploy-plugin .version>2.8.2</maven-deploy-plugin .version>
148148 <build-helper-maven-plugin .version>3.0.0</build-helper-maven-plugin .version>
149- <japicmp-maven-plugin .version>0.14.4 </japicmp-maven-plugin .version>
149+ <japicmp-maven-plugin .version>0.15.3 </japicmp-maven-plugin .version>
150150
151151 <!-- These properties are used by Step functions for its dependencies -->
152152 <json-path .version>2.4.0</json-path .version>
Original file line number Diff line number Diff line change 1818import java .net .URI ;
1919import software .amazon .awssdk .auth .credentials .AwsBasicCredentials ;
2020import software .amazon .awssdk .auth .credentials .StaticCredentialsProvider ;
21+ import software .amazon .awssdk .core .retry .RetryMode ;
2122import software .amazon .awssdk .regions .Region ;
2223import software .amazon .awssdk .services .protocolrestjson .ProtocolRestJsonAsyncClient ;
2324import software .amazon .awssdk .services .protocolrestjson .ProtocolRestJsonClient ;
@@ -30,6 +31,7 @@ public class AsyncRetryHeaderTest extends RetryHeaderTestSuite<MockAsyncHttpClie
3031 public AsyncRetryHeaderTest () {
3132 super (new MockAsyncHttpClient ());
3233 client = ProtocolRestJsonAsyncClient .builder ()
34+ .overrideConfiguration (c -> c .retryPolicy (RetryMode .STANDARD ))
3335 .credentialsProvider (StaticCredentialsProvider .create (AwsBasicCredentials .create ("akid" , "skid" )))
3436 .region (Region .US_EAST_1 )
3537 .endpointOverride (URI .create ("http://localhost" ))
Original file line number Diff line number Diff line change 1818import java .net .URI ;
1919import software .amazon .awssdk .auth .credentials .AwsBasicCredentials ;
2020import software .amazon .awssdk .auth .credentials .StaticCredentialsProvider ;
21+ import software .amazon .awssdk .core .retry .RetryMode ;
2122import software .amazon .awssdk .regions .Region ;
2223import software .amazon .awssdk .services .protocolrestjson .ProtocolRestJsonClient ;
2324import software .amazon .awssdk .testutils .service .http .MockSyncHttpClient ;
@@ -28,12 +29,13 @@ public class SyncRetryHeaderTest extends RetryHeaderTestSuite<MockSyncHttpClient
2829 public SyncRetryHeaderTest () {
2930 super (new MockSyncHttpClient ());
3031 client = ProtocolRestJsonClient .builder ()
31- .credentialsProvider (StaticCredentialsProvider .create (AwsBasicCredentials .create ("akid" ,
32- "skid" )))
33- .region (Region .US_EAST_1 )
34- .endpointOverride (URI .create ("http://localhost" ))
35- .httpClient (mockHttpClient )
36- .build ();
32+ .overrideConfiguration (c -> c .retryPolicy (RetryMode .STANDARD ))
33+ .credentialsProvider (StaticCredentialsProvider .create (AwsBasicCredentials .create ("akid" ,
34+ "skid" )))
35+ .region (Region .US_EAST_1 )
36+ .endpointOverride (URI .create ("http://localhost" ))
37+ .httpClient (mockHttpClient )
38+ .build ();
3739 }
3840
3941 @ Override
You can’t perform that action at this time.
0 commit comments