From 1c99253c6acb1734602029993474d4e3cf71b26e Mon Sep 17 00:00:00 2001 From: ANDREI STAROVEROV Date: Wed, 21 Jul 2021 14:10:37 +0300 Subject: [PATCH] Fix integration tests --- tests/integration/test_access_for_functions/test.py | 2 +- .../test_user_defined_object_persistence/test.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/integration/test_access_for_functions/test.py b/tests/integration/test_access_for_functions/test.py index 0d1f20f3ad3..c93531c0a77 100644 --- a/tests/integration/test_access_for_functions/test.py +++ b/tests/integration/test_access_for_functions/test.py @@ -40,7 +40,7 @@ def test_access_rights_for_funtion(): instance.query("GRANT DROP FUNCTION ON *.* TO B") instance.query("DROP FUNCTION MySum", user = 'B') - assert "Unknown function MySum" in instance.query("SELECT MySum(1, 2)") + assert "Unknown function MySum" in instance.query_and_get_error("SELECT MySum(1, 2)") instance.query("REVOKE CREATE FUNCTION ON default FROM A") assert "it's necessary to have grant CREATE FUNCTION ON *.*" in instance.query_and_get_error(create_function_query, user = 'A') diff --git a/tests/integration/test_user_defined_object_persistence/test.py b/tests/integration/test_user_defined_object_persistence/test.py index f755edd1073..153e9c11773 100644 --- a/tests/integration/test_user_defined_object_persistence/test.py +++ b/tests/integration/test_user_defined_object_persistence/test.py @@ -25,8 +25,7 @@ def test_persistence(): assert instance.query("SELECT MySum1(1,2)") == "3\n" assert instance.query("SELECT MySum2(1,2)") == "5\n" - cluster.shutdown() - cluster.start() + instance.restart_clickhouse() assert instance.query("SELECT MySum1(1,2)") == "3\n" assert instance.query("SELECT MySum2(1,2)") == "5\n" @@ -34,8 +33,7 @@ def test_persistence(): instance.query("DROP FUNCTION MySum2") instance.query("DROP FUNCTION MySum1") - cluster.shutdown() - cluster.start() + instance.restart_clickhouse() assert "Unknown function MySum1" in instance.query_and_get_error("SELECT MySum1(1, 2)") assert "Unknown function MySum2" in instance.query_and_get_error("SELECT MySum2(1, 2)")