From 5f46ec0ad212c59ba9beb6bf765f1dd3ba3ec259 Mon Sep 17 00:00:00 2001 From: Fabio Gelcer Date: Sun, 29 Oct 2023 12:24:48 +0200 Subject: [PATCH] fix(nemesis.py): disrupt_mgmt_restore use right timeout 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. --- sdcm/nemesis.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sdcm/nemesis.py b/sdcm/nemesis.py index 69d3c81fc8..92732315af 100644 --- a/sdcm/nemesis.py +++ b/sdcm/nemesis.py @@ -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