From: John Spray Date: Thu, 10 Nov 2016 22:45:19 +0000 (+0000) Subject: tasks/cephfs: fix wait_until_true logging X-Git-Tag: v11.1.1~58^2^2~13^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc9d0198e4266821f8f4f7d604c33968bdf4b880;p=ceph.git tasks/cephfs: fix wait_until_true logging The success log message was in the wrong place (and unreachable) Signed-off-by: John Spray --- diff --git a/tasks/ceph_test_case.py b/tasks/ceph_test_case.py index 068f63b76e2..b914a10083d 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") +