removes params from teardown

This commit is contained in:
Alvaro Videla 2014-03-15 22:28:26 +01:00
parent 613334574b
commit 72f60bdc1f
1 changed files with 2 additions and 11 deletions

View File

@ -9,7 +9,7 @@
-define(TEST_X, <<"sharding.test">>). -define(TEST_X, <<"sharding.test">>).
-import(rabbit_sharding_test_util, -import(rabbit_sharding_test_util,
[set_param/3, clear_param/2, set_pol/3, clear_pol/1, [set_param/3, set_pol/3, clear_pol/1,
start_other_node/1, cluster_other_node/2, start_other_node/1, cluster_other_node/2,
reset_other_node/1, stop_other_node/1, xr/1, qr/1]). reset_other_node/1, stop_other_node/1, xr/1, qr/1]).
@ -25,7 +25,6 @@ shard_queue_creation_test() ->
teardown(Ch, teardown(Ch,
[{?TEST_X, 3}], [{?TEST_X, 3}],
[],
["3_shard"]) ["3_shard"])
end). end).
@ -42,7 +41,6 @@ shard_queue_creation2_test() ->
teardown(Ch, teardown(Ch,
[{?TEST_X, 3}], [{?TEST_X, 3}],
[],
["3_shard"]) ["3_shard"])
end). end).
@ -56,7 +54,6 @@ shard_no_queue_creation_test() ->
teardown(Ch, teardown(Ch,
[{?TEST_X, 1}], [{?TEST_X, 1}],
[],
["3_shard"]) ["3_shard"])
end). end).
@ -75,7 +72,6 @@ shard_update_spn_test() ->
teardown(Ch, teardown(Ch,
[{?TEST_X, 5}], [{?TEST_X, 5}],
[],
["3_shard"]) ["3_shard"])
end). end).
@ -93,7 +89,6 @@ shard_decrease_spn_keep_queues_test() ->
teardown(Ch, teardown(Ch,
[{?TEST_X, 5}], [{?TEST_X, 5}],
[],
["3_shard"]) ["3_shard"])
end). end).
@ -116,7 +111,6 @@ shard_update_routing_key_test() ->
teardown(Ch, teardown(Ch,
[{?TEST_X, 1}], [{?TEST_X, 1}],
[],
["rkey"]) ["rkey"])
end). end).
@ -152,7 +146,6 @@ shard_basic_consume_interceptor_test() ->
teardown(Ch, teardown(Ch,
[{?TEST_X, 3}], [{?TEST_X, 3}],
[],
["three"]) ["three"])
end). end).
@ -176,7 +169,6 @@ shard_auto_scale_cluster_test() ->
teardown(Ch, teardown(Ch,
[{?TEST_X, 3}], [{?TEST_X, 3}],
[],
["three"]) ["three"])
end). end).
@ -212,12 +204,11 @@ cleanup({Nodename, _}) ->
[rpc:call(n(Nodename), rabbit_amqqueue, delete, [Q, false, false]) [rpc:call(n(Nodename), rabbit_amqqueue, delete, [Q, false, false])
|| Q <- queues(Nodename)]. || Q <- queues(Nodename)].
teardown(Ch, Xs, Params, Policies) -> teardown(Ch, Xs, Policies) ->
[begin [begin
exchange_op(Ch, x_delete(XName)), exchange_op(Ch, x_delete(XName)),
delete_queues(Ch, XName, N) delete_queues(Ch, XName, N)
end || {XName, N} <- Xs], end || {XName, N} <- Xs],
[clear_param(Comp, Param) || {Comp, Param} <- Params],
[clear_pol(Policy) || Policy <- Policies]. [clear_pol(Policy) || Policy <- Policies].
delete_queues(Ch, Name, N) -> delete_queues(Ch, Name, N) ->