Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lastgroupsynctime verification in test_failover_and_relocate.py #10874

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ def test_failover_and_relocate(
logger.info(f"Waiting for {wait_time} minutes to run IOs")
sleep(wait_time * 60)

before_failover_last_group_sync_time = []
for obj in drpc_objs:
before_failover_last_group_sync_time = (
before_failover_last_group_sync_time.append(
dr_helpers.verify_last_group_sync_time(obj, scheduling_interval)
)
logger.info("Verified lastGroupSyncTime before failover.")
Expand Down Expand Up @@ -228,22 +229,24 @@ def test_failover_and_relocate(
replaying_images=sum([wl.workload_pvc_count for wl in workloads])
)

after_failover_last_group_sync_time = []
for obj in drpc_objs:
after_failover_last_group_sync_time.append(
dr_helpers.verify_last_group_sync_time(
obj, scheduling_interval, before_failover_last_group_sync_time
)
)
logger.info("Verified lastGroupSyncTime after failover.")

if config.RUN.get("rdr_relocate_via_ui"):
config.switch_acm_ctx()
verify_failover_relocate_status_ui(acm_obj)

logger.info(f"Waiting for {wait_time} minutes to run IOs")
sleep(wait_time * 60)

post_failover_last_group_sync_time = []
for obj, initial_last_group_sync_time in zip(
drpc_objs, before_failover_last_group_sync_time
):
post_failover_last_group_sync_time.append(
dr_helpers.verify_last_group_sync_time(
obj, scheduling_interval, initial_last_group_sync_time
)
)
logger.info("Verified lastGroupSyncTime after failover.")

# Relocate action
for wl in workloads:
if config.RUN.get("rdr_relocate_via_ui"):
Expand Down Expand Up @@ -308,8 +311,10 @@ def test_failover_and_relocate(
acm_obj, action=constants.ACTION_RELOCATE
)

for obj in drpc_objs:
for obj, initial_last_group_sync_time in zip(
drpc_objs, post_failover_last_group_sync_time
):
dr_helpers.verify_last_group_sync_time(
obj, scheduling_interval, after_failover_last_group_sync_time
obj, scheduling_interval, initial_last_group_sync_time
)
logger.info("Verified lastGroupSyncTime after relocate.")
Loading