-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
python: remove arbitrary timeouts from tests #3059
Conversation
51f5e9c
to
f2ecdf1
Compare
Made all the tests succeed on a network with 5 second ping. |
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.
Nice!
res = self.conn.idle_check(timeout=30) | ||
if len(res) == 0: | ||
raise TimeoutError | ||
res = self.conn.idle_check() |
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.
Shouldn't this still raise a TimeoutError if len(res) == 0
? Or will conn.idle_check()
raise an error by itself in this case now?
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.
Without timeout it should not return without a response. If it still does, we return empty res
and outside code will restart idle_check
if it wants a response.
f2ecdf1
to
c4b0f77
Compare
pytest-timeout already handles all deadlocks and is configurable with --timeout option. With this change it is possible to disable timeout with --timeout 0 to run tests on extremely slow connections.
pytest-timeout already handles all deadlocks and is configurable with
--timeout option. With this change it is possible to disable timeout
with --timeout 0 to run tests on extremely slow connections.
#skip-changelog