Merge pull request #48789 from vitlibar/fix-flaky-test-backup-all

Fix flaky test test_backup_all
This commit is contained in:
Alexey Milovidov 2023-04-17 06:24:58 +03:00 committed by GitHub
commit 82fe9d4dbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1206,10 +1206,27 @@ def test_backup_all(exclude_system_log_tables):
exclude_from_backup = []
if exclude_system_log_tables:
system_log_tables = instance.query(
"SELECT concat('system.', table) FROM system.tables WHERE (database = 'system') AND (table LIKE '%_log')"
).splitlines()
exclude_from_backup += system_log_tables
# See the list of log tables in src/Interpreters/SystemLog.cpp
log_tables = [
"query_log",
"query_thread_log",
"part_log",
"trace_log",
"crash_log",
"text_log",
"metric_log",
"filesystem_cache_log",
"filesystem_read_prefetches_log",
"asynchronous_metric_log",
"opentelemetry_span_log",
"query_views_log",
"zookeeper_log",
"session_log",
"transactions_info_log",
"processors_profile_log",
"asynchronous_insert_log",
]
exclude_from_backup += ["system." + table_name for table_name in log_tables]
backup_command = f"BACKUP ALL {'EXCEPT TABLES ' + ','.join(exclude_from_backup) if exclude_from_backup else ''} TO {backup_name}"