Skip to content

Commit a8d5d6d

Browse files
Merge pull request #9143 from rabbitmq/mergify/bp/v3.11.x/pr-9142
Improvements to the `logging_SUITE` testsuite (backport #9140) (backport #9142)
2 parents 87c8562 + a52bda4 commit a8d5d6d

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

deps/rabbit/test/logging_SUITE.erl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ init_per_testcase(Testcase, Config) ->
146146
%% group will run in the context of that RabbitMQ node.
147147
exchange_output ->
148148
ExchProps = [{enabled, true},
149-
{level, info}] ,
149+
{level, debug}] ,
150150
Config1 = rabbit_ct_helpers:set_config(
151151
Config,
152152
[{rmq_nodes_count, 1},
153153
{rmq_nodename_suffix, Testcase}]),
154154
Config2 = rabbit_ct_helpers:merge_app_env(
155155
Config1,
156156
{rabbit, [{log, [{exchange, ExchProps},
157-
{file, [{level, info}]}]}]}),
157+
{file, [{level, debug}]}]}]}),
158158
rabbit_ct_helpers:run_steps(
159159
Config2,
160160
rabbit_ct_broker_helpers:setup_steps() ++
@@ -1004,12 +1004,11 @@ logging_to_exchange_works(Config) ->
10041004
ExchangeHandler = get_handler_by_id(Handlers, rmq_1_exchange),
10051005
?assertNotEqual(undefined, ExchangeHandler),
10061006
?assertMatch(
1007-
#{level := info,
1007+
#{level := debug,
10081008
module := rabbit_logger_exchange_h,
10091009
filter_default := log,
1010-
filters := [{progress_reports, {_, stop}},
1011-
{rmqlog_filter, {_, #{global := info,
1012-
upgrade := none}}}],
1010+
filters := [{progress_reports, {_, log}},
1011+
{rmqlog_filter, {_, #{global := debug}}}],
10131012
formatter := {rabbit_logger_text_fmt, _},
10141013
config := #{exchange := _}},
10151014
ExchangeHandler),
@@ -1030,17 +1029,18 @@ logging_to_exchange_works(Config) ->
10301029
UpgradeFileHandler),
10311030

10321031
%% Wait for the expected exchange to be automatically declared.
1033-
lists:any(
1034-
fun(_) ->
1035-
Ret = rabbit_ct_broker_helpers:rpc(
1036-
Config, 0,
1037-
rabbit_exchange, lookup, [Exchange]),
1038-
case Ret of
1039-
{ok, _} -> true;
1040-
_ -> timer:sleep(500),
1041-
false
1042-
end
1043-
end, lists:seq(1, 20)),
1032+
?assert(
1033+
lists:any(
1034+
fun(_) ->
1035+
Ret = rabbit_ct_broker_helpers:rpc(
1036+
Config, 0,
1037+
rabbit_exchange, lookup, [Exchange]),
1038+
case Ret of
1039+
{ok, _} -> true;
1040+
_ -> timer:sleep(500),
1041+
false
1042+
end
1043+
end, lists:seq(1, 20))),
10441044

10451045
%% Declare a queue to collect all logged messages.
10461046
{Conn, Chan} = rabbit_ct_client_helpers:open_connection_and_channel(
@@ -1049,7 +1049,7 @@ logging_to_exchange_works(Config) ->
10491049
?assertMatch(
10501050
#'queue.declare_ok'{},
10511051
amqp_channel:call(Chan, #'queue.declare'{queue = QName,
1052-
durable = false})),
1052+
durable = true})),
10531053
?assertMatch(
10541054
#'queue.bind_ok'{},
10551055
amqp_channel:call(Chan, #'queue.bind'{queue = QName,

0 commit comments

Comments
 (0)