Skip to content

Commit

Permalink
fix(nemesis.py): disrupt_mgmt_restore use right timeout
Browse files Browse the repository at this point in the history
since we have different snapshots to be used,
with different sizes, the timeout of each one
may differ, and the function was waiting at some
general duration, other than the specified for
each snapshot size.
this change will make it use the specific timeout
for the snapshot selected to the test.
  • Loading branch information
Fabio Gelcer authored and fruch committed Nov 8, 2023
1 parent 8b478c2 commit 5f46ec0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sdcm/nemesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2815,10 +2815,9 @@ def execute_data_validation_thread(command_template, keyspace_name, number_of_ro
self.log.info("Restoring the schema of the keyspace '%s'", chosen_snapshot_info["keyspace_name"])
restore_task = mgr_cluster.create_restore_task(restore_schema=True, location_list=location_list,
snapshot_tag=chosen_snapshot_tag)
step = 10
extra_time = 300
restore_task.wait_and_get_final_status(step=step,
timeout=chosen_snapshot_info['expected_timeout'] / step + extra_time)

restore_task.wait_and_get_final_status(step=10,
timeout=6*60) # giving 6 minutes to restore the schema
assert restore_task.status == TaskStatus.DONE, f'Schema restoration of {chosen_snapshot_tag} has failed!'
self.cluster.restart_scylla() # After schema restoration, you should restart the nodes

Expand Down

0 comments on commit 5f46ec0

Please sign in to comment.