diff --git a/deps/rabbitmq_shovel/src/rabbit_amqp091_shovel.erl b/deps/rabbitmq_shovel/src/rabbit_amqp091_shovel.erl index fcfcd464f4..aed455163e 100644 --- a/deps/rabbitmq_shovel/src/rabbit_amqp091_shovel.erl +++ b/deps/rabbitmq_shovel/src/rabbit_amqp091_shovel.erl @@ -94,11 +94,13 @@ init_source(Conf = #{ack_mode := AckMode, NoAck = AckMode =:= no_ack, case NoAck of false -> + rabbit_log:debug("init_source. calling basic.qos ~p", [Prefetch]), #'basic.qos_ok'{} = amqp_channel:call(Chan, #'basic.qos'{prefetch_count = Prefetch}), ok; true -> ok end, + rabbit_log:debug("init_source. calling remaining"), Remaining = remaining(Chan, Conf), case Remaining of 0 -> @@ -628,12 +630,10 @@ decl_fun(Decl, _Conn, Ch) -> end || M <- lists:reverse(Decl)]. check_fun(Queue, _Conn, Ch) -> - try - amqp_channel:call(Ch, #'queue.declare'{queue = Queue, - passive = true}) - after - catch amqp_channel:close(Ch) - end. + rabbit_log:debug("Checking if queue ~p exits", [Queue]), + amqp_channel:call(Ch, #'queue.declare'{queue = Queue, + passive = true}), + rabbit_log:debug("Queue ~p exits", [Queue]). parse_parameter(Param, Fun, Value) -> try diff --git a/deps/rabbitmq_shovel/test/configuration_SUITE.erl b/deps/rabbitmq_shovel/test/configuration_SUITE.erl index 9c08cf3ad6..bd36b73db4 100644 --- a/deps/rabbitmq_shovel/test/configuration_SUITE.erl +++ b/deps/rabbitmq_shovel/test/configuration_SUITE.erl @@ -22,7 +22,8 @@ all() -> [ - {group, non_parallel_tests} + {group, non_parallel_tests}, + {group, with_predefined_topology} ]. groups() -> @@ -45,7 +46,9 @@ groups() -> init_per_suite(Config) -> rabbit_ct_helpers:log_environment(), Config1 = rabbit_ct_helpers:set_config(Config, [ - {rmq_nodename_suffix, ?MODULE} + {rmq_nodename_suffix, ?MODULE}, + {ignored_crashes, + ["server_initiated_close,404"]} ]), rabbit_ct_helpers:run_setup_steps(Config1, rabbit_ct_broker_helpers:setup_steps() ++ @@ -225,7 +228,7 @@ valid_configuration(Config) -> valid_configuration_with_predefined_resources(Config) -> ok = rabbit_ct_broker_helpers:rpc(Config, 0, ?MODULE, setup_shovels2, [Config]), - run_valid_test2(Config), + declare_queue(Config), ok = rabbit_ct_broker_helpers:rpc(Config, 0, ?MODULE, await_running_shovel, [test_shovel]). run_valid_test(Config) -> @@ -290,7 +293,7 @@ run_valid_test(Config) -> rabbit_ct_client_helpers:close_channel(Chan). -run_valid_test2(Config) -> +declare_queue(Config) -> Chan = rabbit_ct_client_helpers:open_channel(Config, 0), amqp_channel:call(Chan, #'queue.declare'{queue = ?QUEUE, durable = true}),