summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2019-09-16 15:06:41 +0300
committerGitHub <noreply@github.com>2019-09-16 15:06:41 +0300
commit6519b2c0fa47a65326f4af0ea3dce3aa7be69373 (patch)
tree705d378f6737bdb14b485ef522b1f63f8528fc9b /test
parente433d5e0736e1efb5922e75a55016c995d6aa339 (diff)
parentd5213d4ba630da0dd85426d803dd53c5221d686b (diff)
downloadrabbitmq-server-git-6519b2c0fa47a65326f4af0ea3dce3aa7be69373.tar.gz
Merge pull request #2108 from rabbitmq/rebalance-all-queues
Return number of queues per type
Diffstat (limited to 'test')
-rw-r--r--test/dynamic_ha_SUITE.erl18
-rw-r--r--test/quorum_queue_SUITE.erl6
2 files changed, 20 insertions, 4 deletions
diff --git a/test/dynamic_ha_SUITE.erl b/test/dynamic_ha_SUITE.erl
index 5eccfd2ad5..b1171a3f5f 100644
--- a/test/dynamic_ha_SUITE.erl
+++ b/test/dynamic_ha_SUITE.erl
@@ -571,7 +571,11 @@ rebalance_all(Config) ->
{ok, Summary} = rpc:call(A, rabbit_amqqueue, rebalance, [classic, ".*", ".*"]),
%% Check that we have at most 2 queues per node
- ?assert(lists:all(fun({_, V}) -> V =< 2 end, Summary)),
+ ?assert(lists:all(fun(NodeData) ->
+ lists:all(fun({_, V}) when is_integer(V) -> V =< 2;
+ (_) -> true end,
+ NodeData)
+ end, Summary)),
%% Check that Q1 and Q2 haven't moved
assert_slaves(A, Q1, {A, [B, C]}, [{A, []}, {A, [B]}, {A, [C]}]),
assert_slaves(A, Q2, {A, [B, C]}, [{A, []}, {A, [B]}, {A, [C]}]),
@@ -608,7 +612,11 @@ rebalance_exactly(Config) ->
{ok, Summary} = rpc:call(A, rabbit_amqqueue, rebalance, [classic, ".*", ".*"]),
%% Check that we have at most 2 queues per node
- ?assert(lists:all(fun({_, V}) -> V =< 2 end, Summary)),
+ ?assert(lists:all(fun(NodeData) ->
+ lists:all(fun({_, V}) when is_integer(V) -> V =< 2;
+ (_) -> true end,
+ NodeData)
+ end, Summary)),
%% Check that Q1 and Q2 haven't moved
?assertEqual(A, node(proplists:get_value(pid, find_queue(Q1, A)))),
?assertEqual(A, node(proplists:get_value(pid, find_queue(Q2, A)))),
@@ -647,7 +655,11 @@ rebalance_nodes(Config) ->
{ok, Summary} = rpc:call(A, rabbit_amqqueue, rebalance, [classic, ".*", ".*"]),
%% Check that we have at most 3 queues per node
- ?assert(lists:all(fun({_, V}) -> V =< 3 end, Summary)),
+ ?assert(lists:all(fun(NodeData) ->
+ lists:all(fun({_, V}) when is_integer(V) -> V =< 3;
+ (_) -> true end,
+ NodeData)
+ end, Summary)),
%% Check that Q1 and Q2 haven't moved
?assertEqual(A, node(proplists:get_value(pid, find_queue(Q1, A)))),
?assertEqual(A, node(proplists:get_value(pid, find_queue(Q2, A)))),
diff --git a/test/quorum_queue_SUITE.erl b/test/quorum_queue_SUITE.erl
index 819f8f8761..384e7a818e 100644
--- a/test/quorum_queue_SUITE.erl
+++ b/test/quorum_queue_SUITE.erl
@@ -706,7 +706,11 @@ rebalance(Config) ->
?assertMatch({ok, _, {_, Leader2}}, ra:members({ra_name(Q2), Server0})),
%% Check that we have at most 2 queues per node
- ?assert(lists:all(fun({_, V}) -> V =< 2 end, Summary)),
+ ?assert(lists:all(fun(NodeData) ->
+ lists:all(fun({_, V}) when is_integer(V) -> V =< 2;
+ (_) -> true end,
+ NodeData)
+ end, Summary)),
ok.
subscribe_should_fail_when_global_qos_true(Config) ->