]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: wait for 100 seconds to make sure the quota to be enforced 51132/head
authorXiubo Li <xiubli@redhat.com>
Tue, 18 Apr 2023 14:22:37 +0000 (22:22 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 18 Apr 2023 14:30:09 +0000 (22:30 +0800)
The worst case in kclient the dirty caps will be held for 60 seconds,
and also the MDS may defer updating the directory rstat for 5 seconds,
which is per tick, maybe longer if needs to wait for mdlog to flush.

Fixes: https://tracker.ceph.com/issues/59349
Signed-off-by: Xiubo Li <xiubli@redhat.com>
qa/tasks/cephfs/test_volumes.py

index 496e48d16b1b84227c5928e0528b805015397a50..379c175e39bb5484e696df8cd2e60a11afd42207 100644 (file)
@@ -1244,8 +1244,10 @@ class TestSubvolumeGroups(TestVolumesHelper):
         try:
             # write two files of 1MB file to exceed the quota
             self._do_subvolume_io(subvolname, subvolume_group=group, create_dir='dir1', number_of_files=2)
-            # For quota to be enforced
-            time.sleep(20)
+            # For quota to be enforced. Just wait for 100 seconds because the worst case in kclient the
+            # dirty caps will be held for 60 seconds, and also the MDS may defer updating the dir rstat
+            # for 5 seconds, which is per tick, maybe longer if need to wait for mdlog to flush.
+            time.sleep(100)
             # create 400 files of 1MB to exceed quota
             self._do_subvolume_io(subvolname, subvolume_group=group, create_dir='dir2', number_of_files=400)
         except CommandFailedError: