Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent infinite loop when DynamoDbClient connection fails #154

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

wafuwafu13
Copy link
Contributor

Issue #, if available:

Description of changes:

Set maximum number of retries and display errors.

test in my local environment:

$ cargo test test_create_table
...
failures:

---- test_create_table stdout ----
DynamoDB Local is up as a container: Couldn't connect: Error during dispatch: error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known 
 Retry after 3 seconds.
Couldn't connect: Error during dispatch: error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known 
 Retry after 3 seconds.
Couldn't connect: Error during dispatch: error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known 
 Retry after 3 seconds.
Couldn't connect: Error during dispatch: error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known 
 Retry after 3 seconds.
Couldn't connect: Error during dispatch: error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known 
 Retry after 3 seconds.
thread 'test_create_table' panicked at 'Failed to connect after 5 attempts.', tests/util/mod.rs:130:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
...

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@zulinx86 zulinx86 merged commit 96fb355 into awslabs:main Aug 24, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants