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
TDL-19176: Add backoff/retry for 5xx errors #115
Conversation
# pipedrive object | ||
pipedrive_tap = _tap.PipedriveTap(config, {}) | ||
|
||
def test_json_decode_successfull_with_200(self, mocked_jsondecode_successful_request, mocked_sleep): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is mocked_sleep
passed in to all these functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you look at the code here, it has two decorators. each representing the parameters of the methods. by passing the mocked_sleep
we are instructing the unit-test to skip the backoff time when encountering the exception. If we remove both mocked_sleep
and its respective decorator then the unit-test will take time mentioned here to complete. So, we add the mocked_sleep
and its decorator to skip the waiting time for unit-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. Cool, sounds good to me. I'll approve.
Description of change
TDL-19176: Add backoff/retry for 5xx errors
Manual QA steps
Risks
Rollback steps