@@ -589,7 +589,7 @@ def test_cephfs_mirror_stats(self):
589589 # create a bunch of files in a directory to snap
590590 self .mount_a .run_shell (["mkdir" , "d0" ])
591591 for i in range (10 ):
592- self .mount_a .write_n_mb (os .path .join ('d0' , f'file.{ i } ' ), 1024 )
592+ self .mount_a .write_n_mb (os .path .join ('d0' , f'file.{ i } ' ), 100 )
593593
594594 time .sleep (60 )
595595 self .enable_mirroring (self .primary_fs_name , self .primary_fs_id )
@@ -603,7 +603,7 @@ def test_cephfs_mirror_stats(self):
603603 # take a snapshot
604604 self .mount_a .run_shell (["mkdir" , "d0/.snap/snap0" ])
605605
606- time .sleep (500 )
606+ time .sleep (120 )
607607 self .check_peer_status (self .primary_fs_name , self .primary_fs_id ,
608608 "client.mirror_remote@ceph" , '/d0' , 'snap0' , 1 )
609609 self .verify_snapshot ('d0' , 'snap0' )
@@ -613,20 +613,20 @@ def test_cephfs_mirror_stats(self):
613613 second = res [TestMirroring .PERF_COUNTER_KEY_NAME_CEPHFS_MIRROR_PEER ][0 ]
614614 self .assertGreater (second ["counters" ]["snaps_synced" ], first ["counters" ]["snaps_synced" ])
615615 self .assertGreater (second ["counters" ]["last_synced_start" ], first ["counters" ]["last_synced_start" ])
616- self .assertGreater (second ["counters" ]["last_synced_end" ], second ["counters" ]["last_synced_start" ])
616+ self .assertGreaterEqual (second ["counters" ]["last_synced_end" ], second ["counters" ]["last_synced_start" ])
617617 self .assertGreater (second ["counters" ]["last_synced_duration" ], 0 )
618- self .assertEquals (second ["counters" ]["last_synced_bytes" ], 10737418240 ) # last_synced_bytes = 10 files of 1024MB size each
618+ self .assertEquals (second ["counters" ]["last_synced_bytes" ], 1048576000 ) # last_synced_bytes = 10 files of 100MB size each
619619
620620 # some more IO
621- for i in range (10 ):
622- self .mount_a .write_n_mb (os .path .join ('d0' , f'more_file.{ i } ' ), 1024 )
621+ for i in range (15 ):
622+ self .mount_a .write_n_mb (os .path .join ('d0' , f'more_file.{ i } ' ), 100 )
623623
624624 time .sleep (60 )
625625
626626 # take another snapshot
627627 self .mount_a .run_shell (["mkdir" , "d0/.snap/snap1" ])
628628
629- time .sleep (500 )
629+ time .sleep (240 )
630630 self .check_peer_status (self .primary_fs_name , self .primary_fs_id ,
631631 "client.mirror_remote@ceph" , '/d0' , 'snap1' , 2 )
632632 self .verify_snapshot ('d0' , 'snap1' )
@@ -636,9 +636,9 @@ def test_cephfs_mirror_stats(self):
636636 third = res [TestMirroring .PERF_COUNTER_KEY_NAME_CEPHFS_MIRROR_PEER ][0 ]
637637 self .assertGreater (third ["counters" ]["snaps_synced" ], second ["counters" ]["snaps_synced" ])
638638 self .assertGreater (third ["counters" ]["last_synced_start" ], second ["counters" ]["last_synced_end" ])
639- self .assertGreater (third ["counters" ]["last_synced_end" ], third ["counters" ]["last_synced_start" ])
639+ self .assertGreaterEqual (third ["counters" ]["last_synced_end" ], third ["counters" ]["last_synced_start" ])
640640 self .assertGreater (third ["counters" ]["last_synced_duration" ], 0 )
641- self .assertEquals (third ["counters" ]["last_synced_bytes" ], 10737418240 ) # last_synced_bytes = 10 files of 1024MB size each
641+ self .assertEquals (third ["counters" ]["last_synced_bytes" ], 1572864000 ) # last_synced_bytes = 15 files of 100MB size each
642642
643643 # delete a snapshot
644644 self .mount_a .run_shell (["rmdir" , "d0/.snap/snap0" ])
0 commit comments