Skip to content

Commit

Permalink
Reduce retries to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed May 3, 2024
1 parent 6398574 commit 59090a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/credentials_provider_cognito.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <inttypes.h>

#define COGNITO_CONNECT_TIMEOUT_DEFAULT_IN_SECONDS 5
#define COGNITO_MAX_RETRIES 8
#define COGNITO_MAX_RETRIES 3
#define HTTP_REQUEST_BODY_INITIAL_SIZE 1024
#define HTTP_RESPONSE_BODY_INITIAL_SIZE 4096

Expand Down
2 changes: 1 addition & 1 deletion source/credentials_provider_sts.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static struct aws_byte_cursor s_content_length = AWS_BYTE_CUR_INIT_FROM_STRING_L
static struct aws_byte_cursor s_path = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("/");
static struct aws_byte_cursor s_signing_region = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("us-east-1");
static struct aws_byte_cursor s_service_name = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("sts");
static const int s_max_retries = 8;
static const int s_max_retries = 3;

const uint16_t aws_sts_assume_role_default_duration_secs = 900;

Expand Down
3 changes: 1 addition & 2 deletions tests/credentials_provider_sts_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,7 @@ static int s_credentials_provider_sts_direct_config_service_fails_fn(struct aws_

mock_aws_set_system_time(0);
s_tester.mock_response_code = 529;
// Todo: What? 8 retries seems a lot
int expected_num_requests = 9;
int expected_num_requests = 4;
for (int i = 0; i < expected_num_requests; i++) {
aws_array_list_push_back(&s_tester.response_data_callbacks, &s_malformed_creds_doc);
}
Expand Down

0 comments on commit 59090a3

Please sign in to comment.