Skip to content

Commit fdc0f47

Browse files
committed
Revert "Merge pull request #2325 from rabbitmq/revert-rabbitmq-server-2308-dead_queue_rejects"
This reverts commit 9b80b9c.
1 parent afcca4e commit fdc0f47

File tree

1 file changed

+8
-40
lines changed

1 file changed

+8
-40
lines changed

test/confirms_rejects_SUITE.erl

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ groups() ->
1818
[
1919
{parallel_tests, [parallel], [
2020
{overflow_reject_publish_dlx, [parallel], OverflowTests},
21-
{overflow_reject_publish, [parallel], OverflowTests},
22-
dead_queue_rejects
21+
{overflow_reject_publish, [parallel], OverflowTests}
2322
]}
2423
].
2524

@@ -63,8 +62,7 @@ init_per_testcase(policy_resets_to_default = Testcase, Config) ->
6362
rabbit_ct_helpers:testcase_started(
6463
rabbit_ct_helpers:set_config(Config, [{conn, Conn}]), Testcase);
6564
init_per_testcase(Testcase, Config)
66-
when Testcase == confirms_rejects_conflict;
67-
Testcase == dead_queue_rejects ->
65+
when Testcase == confirms_rejects_conflict ->
6866
Conn = rabbit_ct_client_helpers:open_unmanaged_connection(Config),
6967
Conn1 = rabbit_ct_client_helpers:open_unmanaged_connection(Config),
7068

@@ -89,10 +87,6 @@ end_per_testcase(confirms_rejects_conflict = Testcase, Config) ->
8987
XOverflow = ?config(overflow, Config),
9088
QueueName = <<"confirms_rejects_conflict", "_", XOverflow/binary>>,
9189
amqp_channel:call(Ch, #'queue.delete'{queue = QueueName}),
92-
end_per_testcase0(Testcase, Config);
93-
end_per_testcase(dead_queue_rejects = Testcase, Config) ->
94-
{_, Ch} = rabbit_ct_client_helpers:open_connection_and_channel(Config, 0),
95-
amqp_channel:call(Ch, #'queue.delete'{queue = <<"dead_queue_rejects">>}),
9690
end_per_testcase0(Testcase, Config).
9791

9892
end_per_testcase0(Testcase, Config) ->
@@ -108,37 +102,6 @@ end_per_testcase0(Testcase, Config) ->
108102

109103
rabbit_ct_helpers:testcase_finished(Config, Testcase).
110104

111-
dead_queue_rejects(Config) ->
112-
Conn = ?config(conn, Config),
113-
{ok, Ch} = amqp_connection:open_channel(Conn),
114-
QueueName = <<"dead_queue_rejects">>,
115-
amqp_channel:call(Ch, #'confirm.select'{}),
116-
amqp_channel:register_confirm_handler(Ch, self()),
117-
118-
amqp_channel:call(Ch, #'queue.declare'{queue = QueueName,
119-
durable = true}),
120-
121-
amqp_channel:call(Ch, #'basic.publish'{routing_key = QueueName},
122-
#amqp_msg{payload = <<"HI">>}),
123-
124-
receive
125-
{'basic.ack',_,_} -> ok
126-
after 10000 ->
127-
error(timeout_waiting_for_initial_ack)
128-
end,
129-
130-
kill_the_queue(QueueName, Config),
131-
132-
amqp_channel:cast(Ch, #'basic.publish'{routing_key = QueueName},
133-
#amqp_msg{payload = <<"HI">>}),
134-
135-
receive
136-
{'basic.ack',_,_} -> error(expecting_nack_got_ack);
137-
{'basic.nack',_,_,_} -> ok
138-
after 10000 ->
139-
error(timeout_waiting_for_nack)
140-
end.
141-
142105
confirms_rejects_conflict(Config) ->
143106
Conn = ?config(conn, Config),
144107
Conn1 = ?config(conn1, Config),
@@ -321,7 +284,7 @@ clean_acks_mailbox() ->
321284
end.
322285

323286
kill_the_queue(QueueName, Config) ->
324-
ok = rabbit_ct_broker_helpers:rpc(Config, 0, ?MODULE, kill_the_queue, [QueueName]).
287+
rabbit_ct_broker_helpers:rpc(Config, 0, ?MODULE, kill_the_queue, [QueueName]).
325288

326289
kill_the_queue(QueueName) ->
327290
[begin
@@ -337,3 +300,8 @@ kill_the_queue(QueueName) ->
337300
true -> kill_the_queue(QueueName);
338301
false -> ok
339302
end.
303+
304+
305+
306+
307+

0 commit comments

Comments
 (0)