mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #68178 from ClickHouse/fix-68177
Fix `test_cluster_all_replicas`
This commit is contained in:
commit
203857020f
@ -21,14 +21,14 @@ def start_cluster():
|
||||
def test_cluster(start_cluster):
|
||||
assert (
|
||||
node1.query(
|
||||
"SELECT hostName() FROM clusterAllReplicas('one_shard_two_nodes', system.one)"
|
||||
"SELECT hostName() FROM clusterAllReplicas('one_shard_two_nodes', system.one) ORDER BY ALL"
|
||||
)
|
||||
== "node1\nnode2\n"
|
||||
)
|
||||
|
||||
assert set(
|
||||
node1.query(
|
||||
"""SELECT hostName(), * FROM clusterAllReplicas("one_shard_two_nodes", system.one) ORDER BY dummy"""
|
||||
"""SELECT hostName(), * FROM clusterAllReplicas("one_shard_two_nodes", system.one) ORDER BY ALL"""
|
||||
).splitlines()
|
||||
) == {"node1\t0", "node2\t0"}
|
||||
|
||||
@ -48,7 +48,7 @@ def test_global_in(start_cluster):
|
||||
|
||||
assert set(
|
||||
node1.query(
|
||||
"""SELECT hostName(), * FROM clusterAllReplicas("one_shard_two_nodes", system.one) where dummy GLOBAL IN u"""
|
||||
"""SELECT hostName(), * FROM clusterAllReplicas("one_shard_two_nodes", system.one) where dummy GLOBAL IN u ORDER BY ALL"""
|
||||
).splitlines()
|
||||
) == {"node1\t0", "node2\t0"}
|
||||
|
||||
@ -63,7 +63,7 @@ def test_global_in(start_cluster):
|
||||
def test_skip_unavailable_replica(start_cluster, cluster):
|
||||
assert (
|
||||
node1.query(
|
||||
f"SELECT hostName() FROM clusterAllReplicas('{cluster}', system.one) settings skip_unavailable_shards=1"
|
||||
f"SELECT hostName() FROM clusterAllReplicas('{cluster}', system.one) ORDER BY ALL settings skip_unavailable_shards=1"
|
||||
)
|
||||
== "node1\nnode2\n"
|
||||
)
|
||||
@ -81,5 +81,5 @@ def test_error_on_unavailable_replica(start_cluster, cluster):
|
||||
# so when skip_unavailable_shards=0 - any unavailable replica should lead to an error
|
||||
with pytest.raises(QueryRuntimeException):
|
||||
node1.query(
|
||||
f"SELECT hostName() FROM clusterAllReplicas('{cluster}', system.one) settings skip_unavailable_shards=0"
|
||||
f"SELECT hostName() FROM clusterAllReplicas('{cluster}', system.one) ORDER BY ALL settings skip_unavailable_shards=0"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user