diff --git a/neutron/tests/unit/common/test_utils.py b/neutron/tests/unit/common/test_utils.py index 88d0b5a248b..37e3d3e8091 100644 --- a/neutron/tests/unit/common/test_utils.py +++ b/neutron/tests/unit/common/test_utils.py @@ -542,13 +542,13 @@ class TimerTestCase(base.BaseTestCase): def test__getattr(self): with utils.Timer() as timer: time.sleep(1) - self.assertEqual(1, round(timer.total_seconds())) + self.assertLess(timer.total_seconds(), 2) self.assertEqual(1, timer.delta.seconds) def test__enter_with_timeout(self): with utils.Timer(timeout=10) as timer: time.sleep(1) - self.assertEqual(1, round(timer.total_seconds())) + self.assertLess(timer.total_seconds(), 2) def test__enter_with_timeout_exception(self): msg = r'Timer timeout expired after 1 second\(s\).'