From fc9d0198e4266821f8f4f7d604c33968bdf4b880 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 10 Nov 2016 22:45:19 +0000 Subject: [PATCH] tasks/cephfs: fix wait_until_true logging The success log message was in the wrong place (and unreachable) Signed-off-by: John Spray --- tasks/ceph_test_case.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/ceph_test_case.py b/tasks/ceph_test_case.py index 068f63b76e2a0..b914a10083d41 100644 --- a/tasks/ceph_test_case.py +++ b/tasks/ceph_test_case.py @@ -125,13 +125,14 @@ class CephTestCase(unittest.TestCase): elapsed = 0 while True: if condition(): + log.debug("wait_until_true: success in {0}s".format(elapsed)) return else: if elapsed >= timeout: - raise RuntimeError("Timed out after {0} seconds".format(elapsed)) + raise RuntimeError("Timed out after {0}s".format(elapsed)) else: log.debug("wait_until_true: waiting...") time.sleep(period) elapsed += period - log.debug("wait_until_true: success") + -- 2.39.5