Skip to content

Commit 17e470e

Browse files
MarcialRosalesmichaelklishin
authored andcommitted
Fix test
1 parent e2e92d3 commit 17e470e

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

deps/rabbitmq_shovel/src/rabbit_amqp091_shovel.erl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,13 @@ init_source(Conf = #{ack_mode := AckMode,
9494
NoAck = AckMode =:= no_ack,
9595
case NoAck of
9696
false ->
97+
rabbit_log:debug("init_source. calling basic.qos ~p", [Prefetch]),
9798
#'basic.qos_ok'{} =
9899
amqp_channel:call(Chan, #'basic.qos'{prefetch_count = Prefetch}),
99100
ok;
100101
true -> ok
101102
end,
103+
rabbit_log:debug("init_source. calling remaining"),
102104
Remaining = remaining(Chan, Conf),
103105
case Remaining of
104106
0 ->
@@ -628,12 +630,10 @@ decl_fun(Decl, _Conn, Ch) ->
628630
end || M <- lists:reverse(Decl)].
629631

630632
check_fun(Queue, _Conn, Ch) ->
631-
try
632-
amqp_channel:call(Ch, #'queue.declare'{queue = Queue,
633-
passive = true})
634-
after
635-
catch amqp_channel:close(Ch)
636-
end.
633+
rabbit_log:debug("Checking if queue ~p exits", [Queue]),
634+
amqp_channel:call(Ch, #'queue.declare'{queue = Queue,
635+
passive = true}),
636+
rabbit_log:debug("Queue ~p exits", [Queue]).
637637

638638
parse_parameter(Param, Fun, Value) ->
639639
try

deps/rabbitmq_shovel/test/configuration_SUITE.erl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
all() ->
2424
[
25-
{group, non_parallel_tests}
25+
{group, non_parallel_tests},
26+
{group, with_predefined_topology}
2627
].
2728

2829
groups() ->
@@ -45,7 +46,9 @@ groups() ->
4546
init_per_suite(Config) ->
4647
rabbit_ct_helpers:log_environment(),
4748
Config1 = rabbit_ct_helpers:set_config(Config, [
48-
{rmq_nodename_suffix, ?MODULE}
49+
{rmq_nodename_suffix, ?MODULE},
50+
{ignored_crashes,
51+
["server_initiated_close,404"]}
4952
]),
5053
rabbit_ct_helpers:run_setup_steps(Config1,
5154
rabbit_ct_broker_helpers:setup_steps() ++
@@ -225,7 +228,7 @@ valid_configuration(Config) ->
225228

226229
valid_configuration_with_predefined_resources(Config) ->
227230
ok = rabbit_ct_broker_helpers:rpc(Config, 0, ?MODULE, setup_shovels2, [Config]),
228-
run_valid_test2(Config),
231+
declare_queue(Config),
229232
ok = rabbit_ct_broker_helpers:rpc(Config, 0, ?MODULE, await_running_shovel, [test_shovel]).
230233

231234
run_valid_test(Config) ->
@@ -290,7 +293,7 @@ run_valid_test(Config) ->
290293

291294
rabbit_ct_client_helpers:close_channel(Chan).
292295

293-
run_valid_test2(Config) ->
296+
declare_queue(Config) ->
294297
Chan = rabbit_ct_client_helpers:open_channel(Config, 0),
295298
amqp_channel:call(Chan, #'queue.declare'{queue = ?QUEUE,
296299
durable = true}),

0 commit comments

Comments
 (0)