TDL - 16279 Implement request timeouts#55
Merged
KrisPersonal merged 11 commits intomasterfrom Jan 5, 2022
Merged
Conversation
Comment on lines
+140
to
+141
| @patch('requests.Request', side_effect=Timeout) | ||
| def test_connection_error_backoff(self, mocked_request, ConnectionError): |
There was a problem hiding this comment.
Update above test case as it's for ConnectionError but you mocked the request to raise Timeout. Also, you provided ConnectionError as a mocked argument of time.sleep.
| # on stream. | ||
| date_difference = (datetime.datetime.now() - datetime.datetime(2021, 10, 25, 00, 00, 00)).days | ||
| timedelta_by_stream = {stream: [(date_difference if stream == 'answers' else 25), 0, 0] # {stream_name: [days, hours, minutes], ...} | ||
| for stream in self.expected_streams()} |
Contributor
There was a problem hiding this comment.
The answers stream sets the bookmark as the date when the sync was run. However, after 25th October 2021, there was no record found for answers stream. Hence, we altered the state to set a bookmark so that it never goes beyond 25th October, however for the forms stream the bookmark is updated based on the last record. Thus the new state is updated based on the stream.
dbshah1212
approved these changes
Dec 22, 2021
karanpanchal-crest
approved these changes
Dec 22, 2021
namrata270998
approved these changes
Dec 22, 2021
kspeer825
approved these changes
Dec 28, 2021
KrisPersonal
approved these changes
Jan 5, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of change
Manual QA steps
Risks
Rollback steps