Skip to content

Commit

Permalink
Increase timeout for aws client timeout and retry errors not captured… (
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit committed Jun 15, 2023
1 parent 6a8cce2 commit 7719a91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ class Aws0ClientTest extends AgentInstrumentationSpecification {
def "timeout and retry errors not captured"() {
setup:
// One retry so two requests.
server.enqueue(HttpResponse.delayed(HttpResponse.of(HttpStatus.OK), Duration.ofMillis(500)))
server.enqueue(HttpResponse.delayed(HttpResponse.of(HttpStatus.OK), Duration.ofMillis(500)))
server.enqueue(HttpResponse.delayed(HttpResponse.of(HttpStatus.OK), Duration.ofMillis(5000)))
server.enqueue(HttpResponse.delayed(HttpResponse.of(HttpStatus.OK), Duration.ofMillis(5000)))
AmazonS3Client client = new AmazonS3Client(new ClientConfiguration()
.withRequestTimeout(50 /* ms */)
.withRetryPolicy(PredefinedRetryPolicies.getDefaultRetryPolicyWithCustomMaxRetries(1)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification {
def "timeout and retry errors not captured"() {
setup:
// One retry so two requests.
server.enqueue(HttpResponse.delayed(HttpResponse.of(HttpStatus.OK), Duration.ofMillis(500)))
server.enqueue(HttpResponse.delayed(HttpResponse.of(HttpStatus.OK), Duration.ofMillis(500)))
server.enqueue(HttpResponse.delayed(HttpResponse.of(HttpStatus.OK), Duration.ofMillis(5000)))
server.enqueue(HttpResponse.delayed(HttpResponse.of(HttpStatus.OK), Duration.ofMillis(5000)))
def client = S3Client.builder()
.overrideConfiguration(createOverrideConfigurationBuilder()
.retryPolicy(RetryPolicy.builder().numRetries(1).build())
Expand Down

0 comments on commit 7719a91

Please sign in to comment.