From 044aa4d9237a3ba97707e56b7b814ba3944b1414 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 12 Aug 2022 11:28:16 +0200 Subject: [PATCH] fix --- tests/clickhouse-test | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index 952fc7fb0a9..23de1aba6af 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -182,6 +182,15 @@ def get_db_engine(args, database_name): return "" # Will use default engine +def get_create_database_settings(args, testcase_args): + create_database_settings = dict() + if testcase_args: + create_database_settings["log_comment"] = testcase_args.testcase_basename + if args.db_engine == "Ordinary": + create_database_settings["allow_deprecated_database_ordinary"] = 1 + return create_database_settings + + def get_zookeeper_session_uptime(args): try: if args.replicated_database: @@ -537,9 +546,7 @@ class TestCase: clickhouse_execute( args, "CREATE DATABASE " + database + get_db_engine(testcase_args, database), - settings={ - "log_comment": testcase_args.testcase_basename, - }, + settings=get_create_database_settings(args, testcase_args), ) os.environ["CLICKHOUSE_DATABASE"] = database @@ -1763,6 +1770,7 @@ def main(args): args, f"CREATE DATABASE IF NOT EXISTS {db_name} " f"{get_db_engine(args, db_name)}", + settings=get_create_database_settings(args, None), ) except HTTPError as e: total_time = (datetime.now() - start_time).total_seconds()