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

#8: connection timeout #10

Merged
merged 4 commits into from
May 31, 2019
Merged

#8: connection timeout #10

merged 4 commits into from
May 31, 2019

Conversation

veritazx
Copy link
Contributor

set 3s connection timeout

@dataflake dataflake self-requested a review March 23, 2019 16:22
@dataflake dataflake self-assigned this Mar 23, 2019
@dataflake dataflake added the enhancement New feature or request label Mar 23, 2019
Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

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

Just setting a different arbitrary number as timeout may help your specific issue, but it is not an acceptable solution for all other users of this package.

This should be configurable to make it work for everyone, and the default value should match the original default in order to prevent any surprises.

- add timeout parameter for DatabaseAdapter and database pool classes
- add timeout parameter to Add and Edit Forms
- make sure timeout is None or int
@veritazx
Copy link
Contributor Author

You are right, of course. Timeout is now configurable. The default is None, matching the original default (not setting anything).
Unfortunately I wasn't able to create a Unit Test for testing that the timeout has any effect. Connection attempts to wrong ports etc. always lead directly to Operational Errors in the Test Environment, unlike in our Zope / Plone Scenario, where the timeout has an effect. Any suggestions?

Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

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

Please take a look at the failing flake8 tests and fix those.

Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

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

Thank you!

@dataflake dataflake merged commit 99f7c59 into zopefoundation:master May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants