From ffe79e9f31532821040be6ffa5b43713f8bed55a Mon Sep 17 00:00:00 2001 From: John Spray Date: Fri, 28 Aug 2015 13:57:23 +0100 Subject: [PATCH] tasks/cephfs: timeout on wait in test_network_death So that we can get a failure instead of a hang in Signed-off-by: John Spray --- tasks/cephfs/test_client_recovery.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tasks/cephfs/test_client_recovery.py b/tasks/cephfs/test_client_recovery.py index 33f80a4f35c5f..50290a33e28d5 100644 --- a/tasks/cephfs/test_client_recovery.py +++ b/tasks/cephfs/test_client_recovery.py @@ -305,11 +305,10 @@ class TestClientRecovery(CephFSTestCase): # ...when it should complete promptly a = time.time() - write_blocked.wait() - b = time.time() - recovery_time = b - a + self.wait_until_true(lambda: write_blocked.finished, self.ms_max_backoff * 2) + write_blocked.wait() # Already know we're finished, wait() to raise exception on errors + recovery_time = time.time() - a log.info("recovery time: {0}".format(recovery_time)) - self.assertLess(recovery_time, self.ms_max_backoff * 2) self.assert_session_state(client_id, "open") def test_filelock(self): -- 2.39.5