Skip to content

Commit 0ec788b

Browse files
committed
rabbit_ct_helpers: Fix crash detection
... introduced in commit cb8b0bf. [Why] Two things: 1. The change was incorrectly ported from the Khepri integration branch. Indeed, it lacked the part where it set the `log_locations` key in the `NodeConfig` variable. 2. The return value of `os:getenv/1` was incorrectly matched: this function returns `false` when an environment variable is unset, not `undefined`.
1 parent c30ae67 commit 0ec788b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

deps/rabbitmq_ct_helpers/src/rabbit_ct_broker_helpers.erl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -793,10 +793,12 @@ query_node(Config, NodeConfig) ->
793793
[rabbit, plugins_dir]),
794794
{ok, EnabledPluginsFile} = rpc(Config, Nodename, application, get_env,
795795
[rabbit, enabled_plugins_file]),
796+
LogLocations = rpc(Config, Nodename, rabbit, log_locations, []),
796797
Vars0 = [{pid_file, PidFile},
797798
{data_dir, DataDir},
798799
{plugins_dir, PluginsDir},
799-
{enabled_plugins_file, EnabledPluginsFile}],
800+
{enabled_plugins_file, EnabledPluginsFile},
801+
{log_locations, LogLocations}],
800802
Vars = try
801803
EnabledFeatureFlagsFile = rpc(Config, Nodename,
802804
rabbit_feature_flags,
@@ -1018,11 +1020,11 @@ stop_rabbitmq_nodes(Config) ->
10181020
false;
10191021
undefined ->
10201022
case os:getenv("FIND_CRASHES") of
1021-
undefined -> true;
1022-
"1" -> true;
1023-
"yes" -> true;
1024-
"true" -> true;
1025-
_ -> false
1023+
false -> true;
1024+
"1" -> true;
1025+
"yes" -> true;
1026+
"true" -> true;
1027+
_ -> false
10261028
end
10271029
end,
10281030
case FindCrashes of

0 commit comments

Comments
 (0)