-
-
Notifications
You must be signed in to change notification settings - Fork 748
Remove connect timeout in test #5902
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
Conversation
| def reset_config(): | ||
| warnings.warn( | ||
| "This methods will be removed soon. Consider using the contextmanager " | ||
| "distributed.utils_test.clean_config instead", | ||
| DeprecationWarning, | ||
| ) | ||
| dask.config.config.clear() | ||
| dask.config.config.update(copy.deepcopy(original_config)) |
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 consider this to be an anti-pattern and would suggest to remove this. utils_test is kind of a public API so we'll need to go through a deprecation cycle.
|
Wow, way too many failures for this change. I'll need to have a look |
Unit Test Results 12 files ±0 12 suites ±0 7h 32m 17s ⏱️ + 31m 36s For more details on these failures and errors, see this check. Results for commit 3367f31. ± Comparison against base commit 39c5e88. ♻️ This comment has been updated with latest results. |
| warnings.warn( | ||
| "This methods will be removed soon. Consider using the contextmanager " | ||
| "distributed.utils_test.clean_config instead", | ||
| DeprecationWarning, |
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.
| DeprecationWarning, | |
| FutureWarning, |
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.
Pending tests fix
ad0f293 to
3367f31
Compare
I'm still poking at #5791 but I don't see a reason to postpone the removal of the 5s timeout.
What makes this line even worse is that it a global setting. The set is not used in a contextmanager so this leaks through to all tests, even those that are not using the
cleanfixture assuming it was once called in the interpreter.To avoid having these kind of config leaks, I introduced a contextmanager that properly restores the original state once left and installed it as an autouse fixture.
IMO, the entire
cleanshould be an autouse but I want to keep changes small for nowcc @graingert @crusaderky