From cbc6eeabda81459e4f398e623464e58efea76fc5 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Sun, 15 Dec 2019 16:25:36 -0500 Subject: [PATCH] fix retry test Wait may be exactly 61 seconds if rand = 1 so use AssertLessEqual. --- src/controlflow_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controlflow_test.py b/src/controlflow_test.py index 4abbdd7e..1b19afe9 100644 --- a/src/controlflow_test.py +++ b/src/controlflow_test.py @@ -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')