Skip to content

Commit

Permalink
Try #550:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored May 12, 2022
2 parents cf9c55a + f83102a commit 0ae67af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/utilities/downloads_backend.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function _http_request(backend::DownloadsBackend, request::Request, response_str
end

get_response_with_retry = retry(
get_response; check=check, delays=AWSExponentialBackoff(; max_attempts=4)
get_response; check=check, delays=AWSExponentialBackoff(; max_attempts=10)
)
try
get_response_with_retry()
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/request.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function _http_request(http_backend::HTTPBackend, request::Request, response_str
end

get_response_with_retry = retry(
get_response; check=check, delays=AWSExponentialBackoff(; max_attempts=4)
get_response; check=check, delays=AWSExponentialBackoff(; max_attempts=10)
)

try
Expand Down
4 changes: 2 additions & 2 deletions test/issues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ try
end
end

@testset "Fail all 4 attempts then throw" begin
@testset "Fail all 10 attempts then throw" begin
err_t = if AWS.DEFAULT_BACKEND[] isa AWS.HTTPBackend
HTTP.IOError
else
Downloads.RequestError
end
io = IOBuffer()

apply(_incomplete_patch(; data=data, num_attempts_to_fail=4)) do
apply(_incomplete_patch(; data=data, num_attempts_to_fail=10)) do
params = Dict("response_stream" => io)
@test_throws err_t S3.get_object(bucket, key, params; aws_config=config)

Expand Down

0 comments on commit 0ae67af

Please sign in to comment.