From 552225f329dafe9f92d94df3d5d7bbe3306a64a9 Mon Sep 17 00:00:00 2001 From: Douglas Fuller Date: Thu, 3 Aug 2017 10:00:42 -0400 Subject: [PATCH] qa/cephfs: Fix race in test_volume_client Signed-off-by: Douglas Fuller --- qa/tasks/cephfs/test_volume_client.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephfs/test_volume_client.py b/qa/tasks/cephfs/test_volume_client.py index 3c639bbfc41..65dc9a9eb85 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -230,13 +230,16 @@ vc.disconnect() # Write something outside volume to check this space usage is # not reported in the volume's DF. - other_bin_mb = 6 + other_bin_mb = 8 self.mount_a.write_n_mb("other.bin", other_bin_mb) # global: df should see all the writes (data + other). This is a > # rather than a == because the global spaced used includes all pools - self.assertGreater(self.mount_a.df()['used'], - (data_bin_mb + other_bin_mb) * 1024 * 1024) + def check_df(): + used = self.mount_a.df()['used'] + return used >= (other_bin_mb * 1024 * 1024) + + self.wait_until_true(check_df, timeout=30) # Hack: do a metadata IO to kick rstats self.mounts[2].run_shell(["touch", "foo"]) -- 2.39.5