diff --git a/tests/integration/test_reload_zookeeper/configs/users.xml b/tests/integration/test_reload_zookeeper/configs/users.xml index 59802e82698..6061af8e33d 100644 --- a/tests/integration/test_reload_zookeeper/configs/users.xml +++ b/tests/integration/test_reload_zookeeper/configs/users.xml @@ -2,8 +2,6 @@ - 1 - 1 diff --git a/tests/integration/test_reload_zookeeper/configs/zookeeper.xml b/tests/integration/test_reload_zookeeper/configs/zookeeper.xml index ecadd4c74c3..0cbf9d8e156 100644 --- a/tests/integration/test_reload_zookeeper/configs/zookeeper.xml +++ b/tests/integration/test_reload_zookeeper/configs/zookeeper.xml @@ -13,7 +13,7 @@ zoo3 2181 - 2000 + 20000 \ No newline at end of file diff --git a/tests/integration/test_reload_zookeeper/test.py b/tests/integration/test_reload_zookeeper/test.py index 6bb8ec6580a..292fe6e0772 100644 --- a/tests/integration/test_reload_zookeeper/test.py +++ b/tests/integration/test_reload_zookeeper/test.py @@ -8,7 +8,7 @@ from helpers.test_tools import assert_eq_with_retry cluster = ClickHouseCluster(__file__, zookeeper_config_path='configs/zookeeper.xml') -node = cluster.add_instance('node', with_zookeeper=True, user_configs=["configs/users.xml"]) +node = cluster.add_instance('node', with_zookeeper=True) @pytest.fixture(scope="module") @@ -62,14 +62,16 @@ def test_reload_zookeeper(start_cluster): ## stop all zookeepers, table will be readonly cluster.stop_zookeeper_nodes(["zoo1", "zoo2", "zoo3"]) + node.query("SELECT COUNT() FROM test_table") with pytest.raises(QueryRuntimeException): - node.query("SELECT COUNT() FROM test_table") + node.query("SELECT COUNT() FROM test_table", settings={"select_sequential_consistency" : 1}) ## start zoo2, zoo3, table will be readonly too, because it only connect to zoo1 cluster.start_zookeeper_nodes(["zoo2", "zoo3"]) wait_zookeeper_node_to_start(["zoo2", "zoo3"]) + node.query("SELECT COUNT() FROM test_table") with pytest.raises(QueryRuntimeException): - node.query("SELECT COUNT() FROM test_table") + node.query("SELECT COUNT() FROM test_table", settings={"select_sequential_consistency" : 1}) ## set config to zoo2, server will be normal new_config = """ diff --git a/tests/queries/0_stateless/01513_count_without_select_sequence_consistency.reference b/tests/queries/0_stateless/01513_count_without_select_sequence_consistency_zookeeper.reference similarity index 100% rename from tests/queries/0_stateless/01513_count_without_select_sequence_consistency.reference rename to tests/queries/0_stateless/01513_count_without_select_sequence_consistency_zookeeper.reference diff --git a/tests/queries/0_stateless/01513_count_without_select_sequence_consistency.sql b/tests/queries/0_stateless/01513_count_without_select_sequence_consistency_zookeeper.sql similarity index 86% rename from tests/queries/0_stateless/01513_count_without_select_sequence_consistency.sql rename to tests/queries/0_stateless/01513_count_without_select_sequence_consistency_zookeeper.sql index 8bf7e6a6931..6a6be32278d 100644 --- a/tests/queries/0_stateless/01513_count_without_select_sequence_consistency.sql +++ b/tests/queries/0_stateless/01513_count_without_select_sequence_consistency_zookeeper.sql @@ -1,8 +1,8 @@ SET send_logs_level = 'fatal'; -DROP TABLE IF EXISTS quorum1; -DROP TABLE IF EXISTS quorum2; -DROP TABLE IF EXISTS quorum3; +DROP TABLE IF EXISTS quorum1 SYNC; +DROP TABLE IF EXISTS quorum2 SYNC; +DROP TABLE IF EXISTS quorum3 SYNC; CREATE TABLE quorum1(x UInt32, y Date) ENGINE ReplicatedMergeTree('/clickhouse/tables/test_01513/sequence_consistency', '1') ORDER BY x PARTITION BY y; CREATE TABLE quorum2(x UInt32, y Date) ENGINE ReplicatedMergeTree('/clickhouse/tables/test_01513/sequence_consistency', '2') ORDER BY x PARTITION BY y; @@ -31,6 +31,6 @@ SELECT count() FROM quorum1; SELECT count() FROM quorum2; SELECT count() FROM quorum3; -DROP TABLE quorum1; -DROP TABLE quorum2; -DROP TABLE quorum3; +DROP TABLE quorum1 SYNC; +DROP TABLE quorum2 SYNC; +DROP TABLE quorum3 SYNC;