Skip to content

Commit 6eaad81

Browse files
committed
issue #91: queue policy disabling tests
Signed-off-by: Matteo Cafasso <[email protected]>
1 parent f78dcce commit 6eaad81

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/queue_SUITE.erl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,19 @@ queue_policy(Config) ->
242242
amqp_channel:cast(Channel, #'basic.ack'{delivery_tag = Tag0}),
243243

244244
amqp_channel:call(Channel, #'exchange.delete'{exchange = <<"test0">>}),
245-
amqp_channel:call(Channel, #'queue.delete'{queue = <<"test0">>}).
245+
amqp_channel:call(Channel, #'queue.delete'{queue = <<"test0">>}),
246+
247+
% Policy is cleared, default arguments are restored
248+
rabbit_ct_broker_helpers:clear_policy(Config, 0, <<"policy-test">>),
249+
250+
publish_message(Channel, <<"test">>, "deduplicate-this"),
251+
publish_message(Channel, <<"test">>, "deduplicate-this"),
252+
253+
Get = #'basic.get'{queue = <<"test">>},
254+
{#'basic.get_ok'{delivery_tag = Tag1}, _} = amqp_channel:call(Channel, Get),
255+
{#'basic.get_ok'{delivery_tag = Tag2}, _} = amqp_channel:call(Channel, Get),
256+
amqp_channel:cast(Channel, #'basic.ack'{delivery_tag = Tag1}),
257+
amqp_channel:cast(Channel, #'basic.ack'{delivery_tag = Tag2}).
246258

247259

248260
%% -------------------------------------------------------------------

0 commit comments

Comments
 (0)