From bbbc0566d27811f8da1ff6cfeba15a21c0159ed8 Mon Sep 17 00:00:00 2001 From: Matveev Sergei Date: Sat, 22 Nov 2025 14:01:12 +0000 Subject: [PATCH] fixed test rename table --- .github/config/muted_ya.txt | 2 -- ydb/tests/compatibility/olap/test_rename_table.py | 13 ++++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/config/muted_ya.txt b/.github/config/muted_ya.txt index b959bc4d045e..ab51cae0f32b 100644 --- a/.github/config/muted_ya.txt +++ b/.github/config/muted_ya.txt @@ -175,8 +175,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/olap test_rename_table.py.TestRenameTableRollingUpdate.test_rename_table[rolling_stable-25-3-1_to_current] 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)}`;