]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: fix wait_until_true logging
authorJohn Spray <john.spray@redhat.com>
Thu, 10 Nov 2016 22:45:19 +0000 (22:45 +0000)
committerJohn Spray <john.spray@redhat.com>
Thu, 17 Nov 2016 23:50:08 +0000 (23:50 +0000)
The success log message was in the wrong
place (and unreachable)

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/ceph_test_case.py

index 068f63b76e2a0347ccff54fccf45c8a757020c39..b914a10083d415b4e83e97972c59b74a4f0cf3b9 100644 (file)
@@ -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")
+