From eac13d9d9d007e19896cc87d79f1c60aa55859bd Mon Sep 17 00:00:00 2001 From: Yatsishin Ilya <2159081+qoega@users.noreply.github.com> Date: Tue, 9 Feb 2021 18:37:33 +0300 Subject: [PATCH] Add retries to test_access_control_on_cluster --- tests/integration/test_access_control_on_cluster/test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_access_control_on_cluster/test.py b/tests/integration/test_access_control_on_cluster/test.py index e804be2c94e..bc740402161 100644 --- a/tests/integration/test_access_control_on_cluster/test.py +++ b/tests/integration/test_access_control_on_cluster/test.py @@ -18,22 +18,22 @@ def started_cluster(): def test_access_control_on_cluster(): - ch1.query("CREATE USER Alex ON CLUSTER 'cluster'") + ch1.query_with_retry("CREATE USER Alex ON CLUSTER 'cluster'", retry_count=3) assert ch1.query("SHOW CREATE USER Alex") == "CREATE USER Alex\n" assert ch2.query("SHOW CREATE USER Alex") == "CREATE USER Alex\n" assert ch3.query("SHOW CREATE USER Alex") == "CREATE USER Alex\n" - ch2.query("GRANT ON CLUSTER 'cluster' SELECT ON *.* TO Alex") + ch2.query_with_retry("GRANT ON CLUSTER 'cluster' SELECT ON *.* TO Alex", retry_count=3) assert ch1.query("SHOW GRANTS FOR Alex") == "GRANT SELECT ON *.* TO Alex\n" assert ch2.query("SHOW GRANTS FOR Alex") == "GRANT SELECT ON *.* TO Alex\n" assert ch3.query("SHOW GRANTS FOR Alex") == "GRANT SELECT ON *.* TO Alex\n" - ch3.query("REVOKE ON CLUSTER 'cluster' SELECT ON *.* FROM Alex") + ch3.query_with_retry("REVOKE ON CLUSTER 'cluster' SELECT ON *.* FROM Alex", retry_count=3) assert ch1.query("SHOW GRANTS FOR Alex") == "" assert ch2.query("SHOW GRANTS FOR Alex") == "" assert ch3.query("SHOW GRANTS FOR Alex") == "" - ch2.query("DROP USER Alex ON CLUSTER 'cluster'") + ch2.query_with_retry("DROP USER Alex ON CLUSTER 'cluster'", retry_count=3) assert "There is no user `Alex`" in ch1.query_and_get_error("SHOW CREATE USER Alex") assert "There is no user `Alex`" in ch2.query_and_get_error("SHOW CREATE USER Alex") assert "There is no user `Alex`" in ch3.query_and_get_error("SHOW CREATE USER Alex")