@@ -102,26 +102,28 @@ def test_drop_recreate_plan_apply_validate_flow(redis_url, worker_id, tmp_path):
102102 query_check_file = str (query_check_path ),
103103 )
104104
105- assert report .result == "succeeded"
106- assert report .validation .schema_match is True
107- assert report .validation .doc_count_match is True
108- assert report .validation .key_sample_exists is True
109- assert report .validation .indexing_failures_delta == 0
110- assert not report .validation .errors
111- assert report .benchmark_summary .documents_indexed_per_second is not None
105+ try :
106+ assert report .result == "succeeded"
107+ assert report .validation .schema_match is True
108+ assert report .validation .doc_count_match is True
109+ assert report .validation .key_sample_exists is True
110+ assert report .validation .indexing_failures_delta == 0
111+ assert not report .validation .errors
112+ assert report .benchmark_summary .documents_indexed_per_second is not None
112113
113- live_index = SearchIndex .from_existing (index_name , redis_url = redis_url )
114- assert schemas_equal (live_index .schema .to_dict (), plan .merged_target_schema )
114+ live_index = SearchIndex .from_existing (index_name , redis_url = redis_url )
115+ assert schemas_equal (live_index .schema .to_dict (), plan .merged_target_schema )
115116
116- validator = MigrationValidator ()
117- validation , _target_info , _duration = validator .validate (
118- load_migration_plan (str (plan_path )),
119- redis_url = redis_url ,
120- query_check_file = str (query_check_path ),
121- )
122- assert validation .schema_match is True
123- assert validation .doc_count_match is True
124- assert validation .key_sample_exists is True
125- assert not validation .errors
126-
127- live_index .delete (drop = True )
117+ validator = MigrationValidator ()
118+ validation , _target_info , _duration = validator .validate (
119+ load_migration_plan (str (plan_path )),
120+ redis_url = redis_url ,
121+ query_check_file = str (query_check_path ),
122+ )
123+ assert validation .schema_match is True
124+ assert validation .doc_count_match is True
125+ assert validation .key_sample_exists is True
126+ assert not validation .errors
127+ finally :
128+ live_index = SearchIndex .from_existing (index_name , redis_url = redis_url )
129+ live_index .delete (drop = True )
0 commit comments