]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks: handle failure cleanly in test_stale_caps
authorJohn Spray <jspray@redhat.com>
Mon, 15 Sep 2014 11:16:20 +0000 (12:16 +0100)
committerJohn Spray <jspray@redhat.com>
Mon, 15 Sep 2014 12:44:27 +0000 (13:44 +0100)
Previously would fail because the cap waiter
completed too soon, without noticing that the
reason it completed quickly was because it failed.

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

index 84b23b16b7616113f69126b5324d5a055abe2b3c..03c8232dbf554e61b0f5652974bc68adf010ae79 100644 (file)
@@ -189,6 +189,10 @@ class TestClientRecovery(unittest.TestCase):
         a = time.time()
         cap_waiter.wait()
         b = time.time()
+
+        # Should have succeeded
+        self.assertEqual(cap_waiter.exitstatus, 0)
+
         cap_waited = b - a
         log.info("cap_waiter waited {0}s".format(cap_waited))
         self.assertTrue(self.mds_session_timeout / 2.0 <= cap_waited <= self.mds_session_timeout * 2.0,