mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Fix flaky test_concurrent_queries_restriction_by_query_kind
This commit is contained in:
parent
a402b61ceb
commit
88704c4d9f
@ -9,8 +9,16 @@ cluster = ClickHouseCluster(__file__)
|
||||
node_insert = cluster.add_instance(
|
||||
"node_insert", main_configs=["configs/concurrent_insert_restriction.xml"]
|
||||
)
|
||||
node_select = cluster.add_instance(
|
||||
"node_select", main_configs=["configs/concurrent_select_restriction.xml"]
|
||||
node_select1 = cluster.add_instance(
|
||||
"node_select1", main_configs=["configs/concurrent_select_restriction.xml"]
|
||||
)
|
||||
|
||||
node_select2 = cluster.add_instance(
|
||||
"node_select2", main_configs=["configs/concurrent_select_restriction.xml"]
|
||||
)
|
||||
|
||||
node_select3 = cluster.add_instance(
|
||||
"node_select3", main_configs=["configs/concurrent_select_restriction.xml"]
|
||||
)
|
||||
|
||||
|
||||
@ -18,7 +26,13 @@ node_select = cluster.add_instance(
|
||||
def started_cluster():
|
||||
try:
|
||||
cluster.start()
|
||||
node_select.query(
|
||||
node_select1.query(
|
||||
"create table test_concurrent_insert (x UInt64) ENGINE = MergeTree() order by tuple()"
|
||||
)
|
||||
node_select2.query(
|
||||
"create table test_concurrent_insert (x UInt64) ENGINE = MergeTree() order by tuple()"
|
||||
)
|
||||
node_select3.query(
|
||||
"create table test_concurrent_insert (x UInt64) ENGINE = MergeTree() order by tuple()"
|
||||
)
|
||||
node_insert.query(
|
||||
@ -79,7 +93,7 @@ def common_pattern(node, query_kind, restricted_sql, normal_sql, limit, wait_tim
|
||||
|
||||
def test_select(started_cluster):
|
||||
common_pattern(
|
||||
node_select,
|
||||
node_select1,
|
||||
"select",
|
||||
"select sleep(3)",
|
||||
"insert into test_concurrent_insert values (0)",
|
||||
@ -89,7 +103,7 @@ def test_select(started_cluster):
|
||||
|
||||
# subquery is not counted
|
||||
execute_with_background(
|
||||
node_select,
|
||||
node_select2,
|
||||
"select sleep(3)",
|
||||
"insert into test_concurrent_insert select sleep(3)",
|
||||
2,
|
||||
@ -98,7 +112,7 @@ def test_select(started_cluster):
|
||||
|
||||
# intersect and except are counted
|
||||
common_pattern(
|
||||
node_select,
|
||||
node_select3,
|
||||
"select",
|
||||
"select sleep(1) INTERSECT select sleep(1) EXCEPT select sleep(1)",
|
||||
"insert into test_concurrent_insert values (0)",
|
||||
|
Loading…
Reference in New Issue
Block a user