@@ -111,7 +111,7 @@ end_per_testcase(Testcase, Config) ->
111
111
112
112
smoke (Config ) ->
113
113
Server = rabbit_ct_broker_helpers :get_node_config (Config , 0 , nodename ),
114
- Ch = rabbit_ct_client_helpers :open_channel (Config , Server ),
114
+ { Conn , Ch } = rabbit_ct_client_helpers :open_connection_and_channel (Config , Server ),
115
115
QName = ? config (queue_name , Config ),
116
116
? assertEqual ({'queue.declare_ok' , QName , 0 , 0 },
117
117
declare (Ch , QName , [{<<" x-queue-type" >>, longstr ,
@@ -191,7 +191,7 @@ smoke(Config) ->
191
191
}, ProtocolQueueTypeCounters ),
192
192
193
193
194
- ok = rabbit_ct_client_helpers :close_channel ( Ch ),
194
+ ok = rabbit_ct_client_helpers :close_connection_and_channel ( Conn , Ch ),
195
195
196
196
? assertMatch (
197
197
#{consumers := 0 ,
@@ -202,7 +202,7 @@ smoke(Config) ->
202
202
203
203
ack_after_queue_delete (Config ) ->
204
204
Server = rabbit_ct_broker_helpers :get_node_config (Config , 0 , nodename ),
205
- Ch = rabbit_ct_client_helpers :open_channel (Config , Server ),
205
+ { Conn , Ch } = rabbit_ct_client_helpers :open_connection_and_channel (Config , Server ),
206
206
QName = ? config (queue_name , Config ),
207
207
? assertEqual ({'queue.declare_ok' , QName , 0 , 0 },
208
208
declare (Ch , QName , [{<<" x-queue-type" >>, longstr ,
@@ -223,12 +223,13 @@ ack_after_queue_delete(Config) ->
223
223
after 1000 ->
224
224
ok
225
225
end ,
226
+ ok = rabbit_ct_client_helpers :close_connection_and_channel (Conn , Ch ),
226
227
flush (),
227
228
ok .
228
229
229
230
stream (Config ) ->
230
231
Server = rabbit_ct_broker_helpers :get_node_config (Config , 0 , nodename ),
231
- Ch = rabbit_ct_client_helpers :open_channel (Config , Server ),
232
+ { Conn , Ch } = rabbit_ct_client_helpers :open_connection_and_channel (Config , Server ),
232
233
QName = ? config (queue_name , Config ),
233
234
? assertEqual ({'queue.declare_ok' , QName , 0 , 0 },
234
235
declare (Ch , QName , [{<<" x-queue-type" >>, longstr ,
@@ -238,7 +239,7 @@ stream(Config) ->
238
239
publish_and_confirm (Ch , QName , <<" msg1" >>),
239
240
Args = [{<<" x-stream-offset" >>, longstr , <<" last" >>}],
240
241
241
- SubCh = rabbit_ct_client_helpers :open_channel (Config , 2 ),
242
+ { SubConn , SubCh } = rabbit_ct_client_helpers :open_connection_and_channel (Config , 2 ),
242
243
qos (SubCh , 10 , false ),
243
244
ok = queue_utils :wait_for_local_stream_member (2 , <<" /" >>, QName , Config ),
244
245
@@ -262,6 +263,8 @@ stream(Config) ->
262
263
exit (Err )
263
264
end ,
264
265
266
+ ok = rabbit_ct_client_helpers :close_connection_and_channel (SubConn , SubCh ),
267
+ ok = rabbit_ct_client_helpers :close_connection_and_channel (Conn , Ch ),
265
268
266
269
ok .
267
270
0 commit comments