]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/cephfs/test_fragment.py
import quincy beta 17.1.0
[ceph.git] / ceph / qa / tasks / cephfs / test_fragment.py
index 41977ca202836d8e51642c7aafea640f1db65033..1102f887b5f0a6cd28ac2f20cc5ba6a22a0ae6d5 100644 (file)
@@ -214,11 +214,14 @@ class TestFragmentation(CephFSTestCase):
 
         self.fs.mds_asok(['flush', 'journal'])
 
+        def _check_pq_finished():
+            num_strays = self.fs.mds_asok(['perf', 'dump', 'mds_cache'])['mds_cache']['num_strays']
+            pq_ops = self.fs.mds_asok(['perf', 'dump', 'purge_queue'])['purge_queue']['pq_executing']
+            return num_strays == 0 and pq_ops == 0
+
         # Wait for all strays to purge
-        self.wait_until_equal(
-            lambda: self.fs.mds_asok(['perf', 'dump', 'mds_cache']
-                                     )['mds_cache']['num_strays'],
-            0,
+        self.wait_until_true(
+            lambda: _check_pq_finished(),
             timeout=1200
         )
         # Check that the metadata pool objects for all the myriad