Fix the asyncio wait_for
function for the core tests
#7771
Merged
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.
This PR contains refactoring for
test_http_get_with_redirect
, (in particular, it adds more log output) and it contains an actual fix for the #7767. This refactoring does not fix the problem, but it was a starting point for me to investigate the issue, and I decided to include this change in the PR as it improves logging for the tests and does not clutter the PR too much.The actual fix is to call
patch_wait_for()
inconftest.py
, as it addresses the issuewait_for
function is broken in Python 3.8-3.11 and can be the reason of Tribler freezes and slowdowns #7570which I believe we also have in our tests.
Fixes: #7767