@@ -167,8 +167,9 @@ requeue_two_channels(QType, Config) ->
167
167
QName = atom_to_binary(?FUNCTION_NAME),
168
168
Ctag1 = <<"consumter tag 1">>,
169
169
Ctag2 = <<"consumter tag 2">>,
170
- Ch1 = rabbit_ct_client_helpers:open_channel(Config),
171
- Ch2 = rabbit_ct_client_helpers:open_channel(Config),
170
+ Conn = rabbit_ct_client_helpers:open_unmanaged_connection(Config, 0),
171
+ {ok, Ch1} = amqp_connection:open_channel(Conn),
172
+ {ok, Ch2} = amqp_connection:open_channel(Conn),
172
173
173
174
#'queue.declare_ok'{} = amqp_channel:call(
174
175
Ch1,
@@ -225,7 +226,7 @@ requeue_two_channels(QType, Config) ->
225
226
assert_messages(QName, 4, 4, Config),
226
227
227
228
%% Closing Ch1 should cause both messages to be requeued and delivered to the Ch2.
228
- ok = rabbit_ct_client_helpers:close_channel (Ch1),
229
+ ok = amqp_channel:close (Ch1),
229
230
230
231
receive {#'basic.deliver'{consumer_tag = C5},
231
232
#amqp_msg{payload = <<"1">>}} ->
@@ -247,7 +248,9 @@ requeue_two_channels(QType, Config) ->
247
248
assert_messages(QName, 0, 0, Config),
248
249
249
250
?assertMatch(#'queue.delete_ok'{},
250
- amqp_channel:call(Ch2, #'queue.delete'{queue = QName})).
251
+ amqp_channel:call(Ch2, #'queue.delete'{queue = QName})),
252
+ amqp_connection:close(Conn),
253
+ ok.
251
254
252
255
assert_messages(QNameBin, NumTotalMsgs, NumUnackedMsgs, Config) ->
253
256
Vhost = ?config(rmq_vhost, Config),
0 commit comments