Merge pull request #59948 from ClickHouse/analyzer-fix-test_user_defined_object_persistence

Analyzer: Fix test_user_defined_object_persistence
This commit is contained in:
Dmitry Novik 2024-02-14 10:20:27 +01:00 committed by GitHub
commit a7c2d3146c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 5 deletions

View File

@ -13,5 +13,4 @@ test_settings_profile/test.py::test_show_profiles
test_shard_level_const_function/test.py::test_remote
test_sql_user_defined_functions_on_cluster/test.py::test_sql_user_defined_functions_on_cluster
test_storage_rabbitmq/test.py::test_rabbitmq_materialized_view
test_user_defined_object_persistence/test.py::test_persistence
test_wrong_db_or_table_name/test.py::test_wrong_table_name

View File

@ -35,9 +35,16 @@ def test_persistence():
instance.restart_clickhouse()
assert "Unknown function MySum1" in instance.query_and_get_error(
"SELECT MySum1(1, 2)"
error_message = instance.query_and_get_error("SELECT MySum1(1, 2)")
assert (
"Unknown function MySum1" in error_message
or "Function with name 'MySum1' does not exists. In scope SELECT MySum1(1, 2)"
in error_message
)
assert "Unknown function MySum2" in instance.query_and_get_error(
"SELECT MySum2(1, 2)"
error_message = instance.query_and_get_error("SELECT MySum2(1, 2)")
assert (
"Unknown function MySum2" in error_message
or "Function with name 'MySum2' does not exists. In scope SELECT MySum2(1, 2)"
in error_message
)