Skip to content

Commit

Permalink
Add retry on 500 (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
aymeric-dispa authored Nov 3, 2022
1 parent 8e69802 commit 6be54fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release new version

on:
release:
types: [published]
types: [created]

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
public class RetryInterceptor implements Interceptor {

private static final Set<Integer> RETRYABLE_RESPONSE_CODES = new HashSet<>(Arrays.asList(HTTP_CLIENT_TIMEOUT,
HTTP_INTERNAL_ERROR,
HTTP_BAD_GATEWAY,
HTTP_UNAVAILABLE,
HTTP_GATEWAY_TIMEOUT));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class RetryInterceptorTest {

@ParameterizedTest
@ValueSource(ints = {HTTP_CLIENT_TIMEOUT, HTTP_BAD_GATEWAY, HTTP_UNAVAILABLE,
@ValueSource(ints = {HTTP_CLIENT_TIMEOUT, HTTP_INTERNAL_ERROR, HTTP_BAD_GATEWAY, HTTP_UNAVAILABLE,
HTTP_GATEWAY_TIMEOUT})
void shouldRetryOnRetryableResponseCode(int arg) throws IOException {
int retries = 3;
Expand Down

0 comments on commit 6be54fb

Please sign in to comment.