-
Notifications
You must be signed in to change notification settings - Fork 33
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
Added support for providing a timeout option while setting up a connection #85
Added support for providing a timeout option while setting up a connection #85
Conversation
…ion. Changed the default behaviour to not have any timeout if the option is not provided.
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.
Please address the comments before merging. Otherwise, LGTM
can we add some tests? there's no need to validate the query result but better to validate that the timeout actually is in effect
|
I have added the tests. |
with pytest.raises(httpx.ReadTimeout): | ||
curs.execute(sql) |
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.
i am not very familiar with pytest, this is try to catch and expected httpx.ReadTimeout
and will fail the test when timeout is not thrown correct?
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.
yes, that is correct
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.
👍
Added support for adding a timeout option (in seconds) while setting up a connection. If no timeout is provided, the default behaviour is to have no timeouts.