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) {
146
146
*/
147
147
public SdkHttpFullRequest requestToSend () {
148
148
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 ))
150
150
.build ();
151
151
}
152
152
Original file line number Diff line number Diff line change 146
146
<exec-maven-plugin .version>1.6.0</exec-maven-plugin .version>
147
147
<maven-deploy-plugin .version>2.8.2</maven-deploy-plugin .version>
148
148
<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>
150
150
151
151
<!-- These properties are used by Step functions for its dependencies -->
152
152
<json-path .version>2.4.0</json-path .version>
Original file line number Diff line number Diff line change 18
18
import java .net .URI ;
19
19
import software .amazon .awssdk .auth .credentials .AwsBasicCredentials ;
20
20
import software .amazon .awssdk .auth .credentials .StaticCredentialsProvider ;
21
+ import software .amazon .awssdk .core .retry .RetryMode ;
21
22
import software .amazon .awssdk .regions .Region ;
22
23
import software .amazon .awssdk .services .protocolrestjson .ProtocolRestJsonAsyncClient ;
23
24
import software .amazon .awssdk .services .protocolrestjson .ProtocolRestJsonClient ;
@@ -30,6 +31,7 @@ public class AsyncRetryHeaderTest extends RetryHeaderTestSuite<MockAsyncHttpClie
30
31
public AsyncRetryHeaderTest () {
31
32
super (new MockAsyncHttpClient ());
32
33
client = ProtocolRestJsonAsyncClient .builder ()
34
+ .overrideConfiguration (c -> c .retryPolicy (RetryMode .STANDARD ))
33
35
.credentialsProvider (StaticCredentialsProvider .create (AwsBasicCredentials .create ("akid" , "skid" )))
34
36
.region (Region .US_EAST_1 )
35
37
.endpointOverride (URI .create ("http://localhost" ))
Original file line number Diff line number Diff line change 18
18
import java .net .URI ;
19
19
import software .amazon .awssdk .auth .credentials .AwsBasicCredentials ;
20
20
import software .amazon .awssdk .auth .credentials .StaticCredentialsProvider ;
21
+ import software .amazon .awssdk .core .retry .RetryMode ;
21
22
import software .amazon .awssdk .regions .Region ;
22
23
import software .amazon .awssdk .services .protocolrestjson .ProtocolRestJsonClient ;
23
24
import software .amazon .awssdk .testutils .service .http .MockSyncHttpClient ;
@@ -28,12 +29,13 @@ public class SyncRetryHeaderTest extends RetryHeaderTestSuite<MockSyncHttpClient
28
29
public SyncRetryHeaderTest () {
29
30
super (new MockSyncHttpClient ());
30
31
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 ();
37
39
}
38
40
39
41
@ Override
You can’t perform that action at this time.
0 commit comments