fix retry test

Wait may be exactly 61 seconds if rand = 1 so use AssertLessEqual.
This commit is contained in:
Jay Lee
2019-12-15 16:25:36 -05:00
parent dea2958d9d
commit cbc6eeabda

View File

@@ -82,7 +82,7 @@ class ControlFlowTest(unittest.TestCase):
# Suppress messages while we make a lot of attempts.
error_print_threshold=total_attempts + 1)
# 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.
@patch.object(controlflow.time, 'sleep')