@@ -167,8 +167,9 @@ requeue_two_channels(QType, Config) ->
167167 QName = atom_to_binary (? FUNCTION_NAME ),
168168 Ctag1 = <<" consumter tag 1" >>,
169169 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 ),
172173
173174 # 'queue.declare_ok' {} = amqp_channel :call (
174175 Ch1 ,
@@ -225,7 +226,7 @@ requeue_two_channels(QType, Config) ->
225226 assert_messages (QName , 4 , 4 , Config ),
226227
227228 % % 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 ),
229230
230231 receive {# 'basic.deliver' {consumer_tag = C5 },
231232 # amqp_msg {payload = <<" 1" >>}} ->
@@ -247,7 +248,9 @@ requeue_two_channels(QType, Config) ->
247248 assert_messages (QName , 0 , 0 , Config ),
248249
249250 ? 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 .
251254
252255assert_messages (QNameBin , NumTotalMsgs , NumUnackedMsgs , Config ) ->
253256 Vhost = ? config (rmq_vhost , Config ),
0 commit comments