From: Jos Collin Date: Thu, 19 Sep 2024 06:37:50 +0000 (+0530) Subject: qa: update test for last_sync_duration X-Git-Tag: v18.2.5~254^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd8519ad011cb872c1e3750d4bd9af7a68993b6a;p=ceph.git qa: update test for last_sync_duration Fixes: https://tracker.ceph.com/issues/68131 Signed-off-by: Jos Collin (cherry picked from commit 46e3e28a2e818e7dd9505e8405e4c5b29f15d705) --- diff --git a/qa/tasks/cephfs/test_mirroring.py b/qa/tasks/cephfs/test_mirroring.py index 1430b2cac20..181228f4e1b 100644 --- a/qa/tasks/cephfs/test_mirroring.py +++ b/qa/tasks/cephfs/test_mirroring.py @@ -560,7 +560,7 @@ class TestMirroring(CephFSTestCase): # create a bunch of files in a directory to snap self.mount_a.run_shell(["mkdir", "d0"]) - for i in range(50): + for i in range(100): self.mount_a.write_n_mb(os.path.join('d0', f'file.{i}'), 1) self.enable_mirroring(self.primary_fs_name, self.primary_fs_id) @@ -574,7 +574,7 @@ class TestMirroring(CephFSTestCase): # take a snapshot self.mount_a.run_shell(["mkdir", "d0/.snap/snap0"]) - time.sleep(30) + time.sleep(60) self.check_peer_status(self.primary_fs_name, self.primary_fs_id, "client.mirror_remote@ceph", '/d0', 'snap0', 1) self.verify_snapshot('d0', 'snap0') @@ -586,10 +586,10 @@ class TestMirroring(CephFSTestCase): self.assertGreater(second["counters"]["last_synced_start"], first["counters"]["last_synced_start"]) self.assertGreater(second["counters"]["last_synced_end"], second["counters"]["last_synced_start"]) self.assertGreater(second["counters"]["last_synced_duration"], 0) - self.assertEquals(second["counters"]["last_synced_bytes"], 52428800) # last_synced_bytes = 50 files of 1MB size each + self.assertEquals(second["counters"]["last_synced_bytes"], 104857600) # last_synced_bytes = 100 files of 1MB size each # some more IO - for i in range(75): + for i in range(150): self.mount_a.write_n_mb(os.path.join('d0', f'more_file.{i}'), 1) time.sleep(60) @@ -597,7 +597,7 @@ class TestMirroring(CephFSTestCase): # take another snapshot self.mount_a.run_shell(["mkdir", "d0/.snap/snap1"]) - time.sleep(60) + time.sleep(120) self.check_peer_status(self.primary_fs_name, self.primary_fs_id, "client.mirror_remote@ceph", '/d0', 'snap1', 2) self.verify_snapshot('d0', 'snap1') @@ -609,7 +609,7 @@ class TestMirroring(CephFSTestCase): self.assertGreater(third["counters"]["last_synced_start"], second["counters"]["last_synced_end"]) self.assertGreater(third["counters"]["last_synced_end"], third["counters"]["last_synced_start"]) self.assertGreater(third["counters"]["last_synced_duration"], 0) - self.assertEquals(third["counters"]["last_synced_bytes"], 78643200) # last_synced_bytes = 75 files of 1MB size each + self.assertEquals(third["counters"]["last_synced_bytes"], 157286400) # last_synced_bytes = 150 files of 1MB size each # delete a snapshot self.mount_a.run_shell(["rmdir", "d0/.snap/snap0"])