Skip to content

Commit 5f1975c

Browse files
committed
Fix test
1 parent 204d5b7 commit 5f1975c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deps/rabbit/test/quorum_queue_SUITE.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4161,7 +4161,7 @@ delete_if_empty(Config) ->
41614161
%% Test 1: Delete fails when queue has messages (error 406 PRECONDITION_FAILED)
41624162
publish(Ch, QQ),
41634163
wait_for_messages(Config, [[QQ, <<"1">>, <<"1">>, <<"0">>]]),
4164-
?assertExit({{shutdown, {connection_closing, {server_initiated_close, 406, _}}}, _},
4164+
?assertExit({{shutdown, {server_initiated_close, 406, _}}, _},
41654165
amqp_channel:call(Ch, #'queue.delete'{queue = QQ,
41664166
if_empty = true})),
41674167

@@ -4176,6 +4176,8 @@ delete_if_empty(Config) ->
41764176
ct:fail("Timeout waiting for message")
41774177
end,
41784178
wait_for_messages(Config, [[QQ, <<"0">>, <<"0">>, <<"0">>]]),
4179+
%% Cancel the subscription before trying to delete
4180+
amqp_channel:call(Ch2, #'basic.cancel'{consumer_tag = <<"ctag">>}),
41794181
%% Now delete should succeed
41804182
?assertMatch(#'queue.delete_ok'{},
41814183
amqp_channel:call(Ch2, #'queue.delete'{queue = QQ,

0 commit comments

Comments
 (0)