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

Tdl 16280 implement request timeout #54

Merged
merged 13 commits into from
Dec 13, 2021

Conversation

namrata270998
Copy link
Contributor

Description of change

Implement request timeout with parameter provided in config

Manual QA steps

  • The request backoff for 5 times in case it is timed out.
  • Error should be thrown in case of retries not successful after all the tries
  • Checked the request timeout works for each stream and backoff

Risks

Rollback steps

  • revert this branch

Copy link
Contributor

@kspeer825 kspeer825 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a suggestion on the untitests, but approved.

Comment on lines 18 to 20
with self.assertRaises(Timeout):
client = GoogleClient("dummy_client_id", "dummy_client_secret", "dummy_refresh_token", 300)
client.request("GET")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the client instantiation should be moved outside of this with block. It is unclear what is being tested otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, removed it from the with

@prijendev prijendev merged commit c43d0df into TDL-15623-Crest-Master Dec 13, 2021
@prijendev prijendev mentioned this pull request Dec 13, 2021
KrisPersonal pushed a commit that referenced this pull request Dec 13, 2021
* type of emailaddress corrected (#53)

* Tdl 16079 check best practices (#51)

* Initial commit for best practice update

* updated setup.py and start_date test

* Updated test cases

* Updated start_date test case

* Updated start_date test case

* Updated comment

* Revert back test case changes

* Added new line

* Tdl 14376 pagination failure (#50)

* Initial commit for pagination failer

* Fixed pagination test cases

* Added comments

* Added detail comment into the code

* Removed unnecessary comment

* Removed unnecessary assertion

* Removed extra comment

* added comment for bug (#49)

* TDL-14475 added unsupported feature and unittests (#47)

* added unsupported feature and unittests

* added code comments

* fixed indent

* fixed indentation

* resolved a bug of writing md when 2 consecutive empty headers

* updated the logic for consecutive empty headers

* rsolved comments

* added test case for consecutive empty headers

* added comments

* resolved circleci errors

* resolved comments

Co-authored-by: namrata270998 <namrata.brahmbhatt@crestdatasystems.com>
Co-authored-by: prijendev <prijen.khokhani@crestdatasys.com>

* TDL-14397-Add skipped log when first row is empty (#46)

* added logger message and unittests

* added code comments

* changed the logger message and logic

* resolved comments

Co-authored-by: namrata270998 <namrata.brahmbhatt@crestdatasystems.com>
Co-authored-by: prijendev <prijen.khokhani@crestdatasys.com>

* TDL-16054 added code comments (#52)

* TDL-16054 added code comments

* rsolved comments

Co-authored-by: namrata270998 <namrata.brahmbhatt@crestdatasystems.com>
Co-authored-by: prijendev <prijen.khokhani@crestdatasys.com>

* Tdl 16280 implement request timeout (#54)

* TDL-16280 added request timeout

* TDL-16280: Added factor 3 to add more wait time between 2 calls

* TDL-16280: Updated Connection error as it wasn't defined.

* added backoff for access token

* updated readme

* updated request timeout and added jitter

* added comment for jitter

* added code coverage

* added testcase for connection error

* addd request timeout in config example

* updated the json example

* removed the client initialization outside with

Co-authored-by: dbshah1212 <dhruvin.shah@crestdatasys.com>
Co-authored-by: prijendev <prijen.khokhani@crestdatasys.com>

Co-authored-by: namrata270998 <75604662+namrata270998@users.noreply.github.com>
Co-authored-by: namrata270998 <namrata.brahmbhatt@crestdatasystems.com>
Co-authored-by: dbshah1212 <dhruvin.shah@crestdatasys.com>
@namrata270998 namrata270998 deleted the TDL-16280-implement-request-timeout branch June 2, 2022 10:03
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.

7 participants