mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix clickhouse-test for server w/o is_all_data_sent in system.processes
This commit is contained in:
parent
d8fa806fca
commit
287c098c7e
@ -225,7 +225,7 @@ def get_processlist_after_test(args):
|
||||
FROM clusterAllReplicas('test_cluster_database_replicated', system.processes)
|
||||
WHERE
|
||||
query NOT LIKE '%system.processes%' AND
|
||||
NOT is_all_data_sent AND
|
||||
{'NOT is_all_data_sent AND' if args.suppport_system_processes_is_all_data_sent else ''}
|
||||
Settings['log_comment'] = '{log_comment}' AND
|
||||
current_database = '{database}'
|
||||
""")
|
||||
@ -235,7 +235,7 @@ def get_processlist_after_test(args):
|
||||
FROM system.processes
|
||||
WHERE
|
||||
query NOT LIKE '%system.processes%' AND
|
||||
NOT is_all_data_sent AND
|
||||
{'NOT is_all_data_sent AND' if args.suppport_system_processes_is_all_data_sent else ''}
|
||||
Settings['log_comment'] = '{log_comment}' AND
|
||||
current_database = '{database}'
|
||||
""")
|
||||
@ -1235,6 +1235,12 @@ def collect_build_flags(args):
|
||||
|
||||
return result
|
||||
|
||||
def check_table_column(args, database, table, column):
|
||||
return int(clickhouse_execute(args, f"""
|
||||
SELECT count()
|
||||
FROM system.columns
|
||||
WHERE database = '{database}' AND table = '{table}' AND name = '{column}'
|
||||
""")) > 0
|
||||
|
||||
def suite_key_func(item: str) -> Union[int, Tuple[int, str]]:
|
||||
if args.order == 'random':
|
||||
@ -1338,6 +1344,7 @@ def main(args):
|
||||
raise Exception(msg)
|
||||
|
||||
args.build_flags = collect_build_flags(args)
|
||||
args.suppport_system_processes_is_all_data_sent = check_table_column(args, 'system', 'processes', 'is_all_data_sent')
|
||||
|
||||
if args.skip:
|
||||
args.skip = set(args.skip)
|
||||
|
Loading…
Reference in New Issue
Block a user