mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Fix integration tests
This commit is contained in:
parent
a3e00faaf9
commit
84ef2c9a1f
@ -227,8 +227,8 @@ def test_cmd_mntr(started_cluster):
|
||||
# contains:
|
||||
# 10 nodes created by test
|
||||
# 3 nodes created by clickhouse "/clickhouse/task_queue/ddl"
|
||||
# 1 root node
|
||||
assert int(result["zk_znode_count"]) == 11
|
||||
# 1 root node, 2 keeper system nodes
|
||||
assert int(result["zk_znode_count"]) == 13
|
||||
assert int(result["zk_watch_count"]) == 2
|
||||
assert int(result["zk_ephemerals_count"]) == 2
|
||||
assert int(result["zk_approximate_data_size"]) > 0
|
||||
@ -369,7 +369,7 @@ def test_cmd_srvr(started_cluster):
|
||||
assert int(result["Connections"]) == 1
|
||||
assert int(result["Zxid"]) > 14
|
||||
assert result["Mode"] == "leader"
|
||||
assert result["Node count"] == "11"
|
||||
assert result["Node count"] == "13"
|
||||
|
||||
finally:
|
||||
destroy_zk_client(zk)
|
||||
@ -407,7 +407,7 @@ def test_cmd_stat(started_cluster):
|
||||
assert int(result["Connections"]) == 1
|
||||
assert int(result["Zxid"]) > 14
|
||||
assert result["Mode"] == "leader"
|
||||
assert result["Node count"] == "11"
|
||||
assert result["Node count"] == "13"
|
||||
|
||||
# filter connection statistics
|
||||
cons = [n for n in data.split("\n") if "=" in n]
|
||||
|
@ -193,11 +193,16 @@ def compare_states(zk1, zk2, path="/", exclude_paths=[]):
|
||||
second_children = list(sorted(zk2.get_children(path)))
|
||||
print("Got children left", first_children)
|
||||
print("Got children rigth", second_children)
|
||||
assert first_children == second_children, "Childrens are not equal on path " + path
|
||||
|
||||
if path == "/":
|
||||
assert set(first_children) ^ set(second_children) == set(["keeper"])
|
||||
else:
|
||||
assert first_children == second_children, "Childrens are not equal on path " + path
|
||||
|
||||
for children in first_children:
|
||||
print("Checking child", os.path.join(path, children))
|
||||
compare_states(zk1, zk2, os.path.join(path, children), exclude_paths)
|
||||
if path != "/" or children != "keeper":
|
||||
print("Checking child", os.path.join(path, children))
|
||||
compare_states(zk1, zk2, os.path.join(path, children), exclude_paths)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("create_snapshots"), [True, False])
|
||||
|
Loading…
Reference in New Issue
Block a user