mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
fix retry test
Wait may be exactly 61 seconds if rand = 1 so use AssertLessEqual.
This commit is contained in:
@@ -82,7 +82,7 @@ class ControlFlowTest(unittest.TestCase):
|
|||||||
# Suppress messages while we make a lot of attempts.
|
# Suppress messages while we make a lot of attempts.
|
||||||
error_print_threshold=total_attempts + 1)
|
error_print_threshold=total_attempts + 1)
|
||||||
# Wait time may be between 60 and 61 secs, due to rand addition.
|
# Wait time may be between 60 and 61 secs, due to rand addition.
|
||||||
self.assertLess(mock_sleep.call_args[0][0], 61)
|
self.assertLessEqual(mock_sleep.call_args[0][0], 61)
|
||||||
|
|
||||||
# Prevent the system from actually sleeping and thus slowing down the test.
|
# Prevent the system from actually sleeping and thus slowing down the test.
|
||||||
@patch.object(controlflow.time, 'sleep')
|
@patch.object(controlflow.time, 'sleep')
|
||||||
|
|||||||
Reference in New Issue
Block a user