diff --git a/.github/config/muted_ya.txt b/.github/config/muted_ya.txt index 98f5c2046a9a..4ba5d4b0608c 100644 --- a/.github/config/muted_ya.txt +++ b/.github/config/muted_ya.txt @@ -177,7 +177,6 @@ ydb/tests/compatibility test_stress.py.TestStress.test_tpch1[mixed_current_and_s ydb/tests/compatibility test_stress.py.TestStress.test_tpch1[mixed_current_and_stable-25-3-1-row] ydb/tests/compatibility test_stress.py.TestStress.test_tpch1[mixed_stable-25-3-1-row] ydb/tests/compatibility test_stress.py.TestStress.test_tpch1[mixed_stable-25-3-1_and_stable-25-2-1-row] -ydb/tests/compatibility/olap test_rename_table.py.TestRenameTableRollingUpdate.test_rename_table[rolling_stable-25-2-1_to_stable-25-3-1] ydb/tests/compatibility/s3_backups test_export_import_s3.py.TestExportImportS3.test_topics[mixed_stable-25-3-1_and_stable-25-2-1] ydb/tests/fq/http_api py3test.sole chunk ydb/tests/fq/mem_alloc test_scheduling.py.TestSchedule.test_skip_busy[kikimr0] diff --git a/ydb/tests/compatibility/olap/test_rename_table.py b/ydb/tests/compatibility/olap/test_rename_table.py index 4673dedd2b0e..5d309b490997 100644 --- a/ydb/tests/compatibility/olap/test_rename_table.py +++ b/ydb/tests/compatibility/olap/test_rename_table.py @@ -15,6 +15,12 @@ def predicate(): return True except ydb.issues.Undetermined: return False + except ydb.issues.SchemeError as e: + error_msg = str(e).lower() + if "cannot find table" in error_msg or "does not exist" in error_msg: + logger.debug(f"Got temporary SchemeError, will retry: {e}") + return False + raise return wait_for(predicate, timeout_seconds=timeout_seconds, step_seconds=step_seconds) @@ -157,7 +163,12 @@ def run_iteration(self, iteration): """, {"$data": (rows, ydb.ListType(data_struct_type))} )) - logger.info(f"Iteration {iteration} about to rename") + logger.info(f"Iteration {iteration} about to rename table_{iteration} to table_{iteration + 1}") + wait_for_undetermined_ok(lambda: session_pool.execute_with_retries( + f""" + select count(*) as cnt from `{self.get_table_name(iteration)}`; + """ + )) session_pool.execute_with_retries( f""" ALTER TABLE `{self.get_table_name(iteration)}` RENAME TO `{self.get_table_name(iteration + 1)}`;