From c713423bd18a68ec39e89ad328ca97c186a93094 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 5 Nov 2015 01:15:57 +0000 Subject: [PATCH] tasks/cephfs: fix race in test_sessionmap Fixes: #13698 Signed-off-by: John Spray --- tasks/cephfs/test_sessionmap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/cephfs/test_sessionmap.py b/tasks/cephfs/test_sessionmap.py index 70ee1984dde02..5b0bae4ade98c 100644 --- a/tasks/cephfs/test_sessionmap.py +++ b/tasks/cephfs/test_sessionmap.py @@ -73,7 +73,10 @@ class TestSessionMap(CephFSTestCase): # dirty) # The number of writes is two per session, because the header (sessionmap version) update and # KV write both count. - self.assertEqual(get_omap_wrs() - initial_omap_wrs, 2) + self.wait_until_true( + lambda: get_omap_wrs() - initial_omap_wrs == 2, + timeout=10 # Long enough for an export to get acked + ) # Now end our sessions and check the backing sessionmap is updated correctly self.mount_a.umount_wait() -- 2.39.5