Skip to content

Commit dc3e3e4

Browse files
committed
dynamic_SUITE: Be explicit about connection open+close
[Why] The tests relied on `rabbit_ct_client_helpers` connection and channel manager which doesn't seem to be robust. It causes more harm than helps so far. Hopefully, this will fix some test flakes in CI.
1 parent 653ae36 commit dc3e3e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

deps/rabbitmq_shovel/test/dynamic_SUITE.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -871,16 +871,16 @@ dest_resource_alarm(AckMode, Config) ->
871871
%%----------------------------------------------------------------------------
872872

873873
with_ch(Config, Fun) ->
874-
Ch = rabbit_ct_client_helpers:open_channel(Config, 0),
874+
{Conn, Ch} = rabbit_ct_client_helpers:open_connection_and_channel(Config, 0),
875875
Fun(Ch),
876-
rabbit_ct_client_helpers:close_channel(Ch),
876+
rabbit_ct_client_helpers:close_connection_and_channel(Conn, Ch),
877877
cleanup(Config),
878878
ok.
879879

880880
with_newch(Config, Fun) ->
881-
Ch = rabbit_ct_client_helpers:open_channel(Config, 0),
881+
{Conn, Ch} = rabbit_ct_client_helpers:open_connection_and_channel(Config, 0),
882882
Fun(Ch),
883-
rabbit_ct_client_helpers:close_channel(Ch),
883+
rabbit_ct_client_helpers:close_connection_and_channel(Conn, Ch),
884884
ok.
885885

886886
publish(Ch, X, Key, Payload) when is_binary(Payload) ->

0 commit comments

Comments
 (0)