You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example code:
``def target_method():
print('called')
return False
poll(target_method, step=5, max_tries=2)``
Behavior:
Prints "called", waits 5 seconds, prints "called", waits 5 seconds, raises polling.MaxCallException
Expected:
Prints "called", waits 5 seconds, prints "called", raises polling.MaxCallException immediately
The problem will be more noticeable with a high step value. With a step value of 300, it will wait 5 minutes between failing and raising the exception. Fix is to move the check and raise to before the sleep instead of the top of the loop.
The text was updated successfully, but these errors were encountered:
Example code:
``def target_method():
print('called')
return False
poll(target_method, step=5, max_tries=2)``
Behavior:
Prints "called", waits 5 seconds, prints "called", waits 5 seconds, raises polling.MaxCallException
Expected:
Prints "called", waits 5 seconds, prints "called", raises polling.MaxCallException immediately
The problem will be more noticeable with a high step value. With a step value of 300, it will wait 5 minutes between failing and raising the exception. Fix is to move the check and raise to before the sleep instead of the top of the loop.
The text was updated successfully, but these errors were encountered: