mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
fix
This commit is contained in:
parent
06e42a1b23
commit
044aa4d923
@ -182,6 +182,15 @@ def get_db_engine(args, database_name):
|
|||||||
return "" # Will use default engine
|
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):
|
def get_zookeeper_session_uptime(args):
|
||||||
try:
|
try:
|
||||||
if args.replicated_database:
|
if args.replicated_database:
|
||||||
@ -537,9 +546,7 @@ class TestCase:
|
|||||||
clickhouse_execute(
|
clickhouse_execute(
|
||||||
args,
|
args,
|
||||||
"CREATE DATABASE " + database + get_db_engine(testcase_args, database),
|
"CREATE DATABASE " + database + get_db_engine(testcase_args, database),
|
||||||
settings={
|
settings=get_create_database_settings(args, testcase_args),
|
||||||
"log_comment": testcase_args.testcase_basename,
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
os.environ["CLICKHOUSE_DATABASE"] = database
|
os.environ["CLICKHOUSE_DATABASE"] = database
|
||||||
@ -1763,6 +1770,7 @@ def main(args):
|
|||||||
args,
|
args,
|
||||||
f"CREATE DATABASE IF NOT EXISTS {db_name} "
|
f"CREATE DATABASE IF NOT EXISTS {db_name} "
|
||||||
f"{get_db_engine(args, db_name)}",
|
f"{get_db_engine(args, db_name)}",
|
||||||
|
settings=get_create_database_settings(args, None),
|
||||||
)
|
)
|
||||||
except HTTPError as e:
|
except HTTPError as e:
|
||||||
total_time = (datetime.now() - start_time).total_seconds()
|
total_time = (datetime.now() - start_time).total_seconds()
|
||||||
|
Loading…
Reference in New Issue
Block a user