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

Final error message from retrier displays wait time with wrong text #27

Open
J7mbo opened this issue Apr 27, 2019 · 0 comments
Open

Final error message from retrier displays wait time with wrong text #27

J7mbo opened this issue Apr 27, 2019 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@J7mbo
Copy link
Owner

J7mbo commented Apr 27, 2019

Background

After retrying the maximum amount of times specified, the library adds it's own error to the error list before returning which states the wait time and the maximum number of retries allowed.

For example in where it is used in this app github.com/j7mbo/palmago-streetview, here's what we get when trying to connect to elastic search on running the app for the first time with no elasticsearch connection:

    * Head http://localhost:9200/palmago: dial tcp [::1]:9200: connect: connection refused
    * Head http://localhost:9200/palmago: dial tcp [::1]:9200: connect: connection refused
    * Head http://localhost:9200/palmago: dial tcp [::1]:9200: connect: connection refused
    * Tried calling: 'func() error' 1000000000 times but reached max retries of: 3

I'm pretty damned sure I don't have 1000000000 in my configuration somewhere!

Expected Output

Change the error message so that it says something like:

Tried calling: 'func() error' after waiting for 5 seconds but reached max retries of: 3

Ensure the time is formatted correctly to only be in seconds as this is human readable.

Testing

Ensure you add a test that proves this is working. Easiest thing to do would be to check for two numbers in the error message and assert they are what you expect.

I'm here to help so feel free to ask!

@J7mbo J7mbo added bug Something isn't working good first issue Good for newcomers labels Apr 27, 2019
@J7mbo J7mbo added this to the v2.0.3 milestone Apr 27, 2019
@J7mbo J7mbo changed the title Final error message from retrier displays incorrect call count Final error message from retrier displays wait time with wrong text Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant