Skip to content

Commit f8f3e3e

Browse files
ansdmichaelklishin
authored andcommitted
Add QQ at most once dead letter ordering tests
PR #14926 added a test case that checks that quorum queues at most once dead letter in the correct order for reason `maxlen`. This commit adds tests for dead letter reasons `rejected`, `delivery_limit`, and `expired`.
1 parent 7f024ff commit f8f3e3e

1 file changed

Lines changed: 0 additions & 45 deletions

File tree

deps/rabbit/test/quorum_queue_SUITE.erl

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ all_tests() ->
174174
subscribe_redelivery_count,
175175
message_bytes_metrics,
176176
queue_length_limit_drop_head,
177-
queue_length_bytes_limit_drop_head,
178177
queue_length_limit_reject_publish,
179178
queue_length_limit_policy_cleared,
180179
subscribe_redelivery_limit,
@@ -4010,50 +4009,6 @@ queue_length_limit_drop_head(Config) ->
40104009
amqp_channel:call(Ch, #'basic.get'{queue = QQ,
40114010
no_ack = true})).
40124011

4013-
queue_length_bytes_limit_drop_head(Config) ->
4014-
[Server | _] = Servers = rabbit_ct_broker_helpers:get_node_configs(Config, nodename),
4015-
4016-
Ch = rabbit_ct_client_helpers:open_channel(Config, Server),
4017-
QQ = ?config(queue_name, Config),
4018-
DLQ = <<"dead letter queue">>,
4019-
4020-
?assertEqual({'queue.declare_ok', DLQ, 0, 0},
4021-
declare(Ch, DLQ, [{<<"x-queue-type">>, longstr, <<"quorum">>}])),
4022-
?assertEqual({'queue.declare_ok', QQ, 0, 0},
4023-
declare(Ch, QQ, [{<<"x-queue-type">>, longstr, <<"quorum">>},
4024-
{<<"x-overflow">>, longstr, <<"drop-head">>},
4025-
{<<"x-max-length-bytes">>, long, 1000},
4026-
{<<"x-dead-letter-exchange">>, longstr, <<>>},
4027-
{<<"x-dead-letter-routing-key">>, longstr, DLQ}])),
4028-
4029-
LargePayload = binary:copy(<<"x">>, 1500),
4030-
ok = amqp_channel:cast(Ch,
4031-
#'basic.publish'{routing_key = QQ},
4032-
#amqp_msg{payload = <<"m1">>}),
4033-
ok = amqp_channel:cast(Ch,
4034-
#'basic.publish'{routing_key = QQ},
4035-
#amqp_msg{payload = <<"m2">>}),
4036-
ok = amqp_channel:cast(Ch,
4037-
#'basic.publish'{routing_key = QQ},
4038-
#amqp_msg{payload = LargePayload}),
4039-
wait_for_consensus(QQ, Config),
4040-
wait_for_consensus(DLQ, Config),
4041-
RaName = ra_name(DLQ),
4042-
wait_for_messages_ready(Servers, RaName, 3),
4043-
?assertMatch({#'basic.get_ok'{}, #amqp_msg{payload = <<"m1">>}},
4044-
amqp_channel:call(Ch, #'basic.get'{queue = DLQ,
4045-
no_ack = true})),
4046-
?assertMatch({#'basic.get_ok'{}, #amqp_msg{payload = <<"m2">>}},
4047-
amqp_channel:call(Ch, #'basic.get'{queue = DLQ,
4048-
no_ack = true})),
4049-
?assertMatch({#'basic.get_ok'{}, #amqp_msg{payload = LargePayload}},
4050-
amqp_channel:call(Ch, #'basic.get'{queue = DLQ,
4051-
no_ack = true})),
4052-
4053-
[?assertEqual(#'queue.delete_ok'{message_count = 0},
4054-
amqp_channel:call(Ch, #'queue.delete'{queue = Q}))
4055-
|| Q <- [QQ, DLQ]].
4056-
40574012
queue_length_limit_reject_publish(Config) ->
40584013
[Server | _] = Servers = rabbit_ct_broker_helpers:get_node_configs(Config, nodename),
40594014

0 commit comments

Comments
 (0)