Skip to content

Commit

Permalink
wip 2
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoguin committed Sep 17, 2024
1 parent c51d0cd commit aee465f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions deps/rabbitmq_ct_helpers/src/rabbit_ct_broker_helpers.erl
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ wait_for_node_handling(Procs, Fun, T0, Results) ->
move_nonworking_nodedir_away(NodeConfig) ->
ConfigFile = ?config(erlang_node_config_filename, NodeConfig),
ConfigDir = filename:dirname(ConfigFile),
case os:getenv("RABBITMQ_CT_HELPERS_DELETE_UNUSED_NODES") =/= false
ok = case os:getenv("RABBITMQ_CT_HELPERS_DELETE_UNUSED_NODES") =/= false
andalso ?OTP_RELEASE >= 23 of
true ->
file:del_dir_r(ConfigDir);
Expand Down Expand Up @@ -1135,7 +1135,7 @@ stop_rabbitmq_node(Config, NodeConfig) ->
{"RABBITMQ_NODENAME_FOR_PATHS=~ts", [InitialNodename]}
],
Cmd = ["stop-node" | MakeVars],
case rabbit_ct_helpers:get_config(Config, rabbitmq_run_cmd) of
{ok, _} = case rabbit_ct_helpers:get_config(Config, rabbitmq_run_cmd) of
undefined ->
rabbit_ct_helpers:make(Config, SrcDir, Cmd);
RunCmd ->
Expand Down Expand Up @@ -1914,10 +1914,8 @@ restart_node(Config, Node) ->

stop_node(Config, Node) ->
NodeConfig = get_node_config(Config, Node),
case stop_rabbitmq_node(Config, NodeConfig) of
{skip, _} = Error -> Error;
_ -> ok
end.
_ = stop_rabbitmq_node(Config, NodeConfig),
ok.

stop_node_after(Config, Node, Sleep) ->
timer:sleep(Sleep),
Expand Down Expand Up @@ -2231,7 +2229,7 @@ if_cover(F) ->
os:getenv("COVERAGE")
} of
{false, false} -> ok;
_ -> F()
_ -> _ = F(), ok
end.

setup_meck(Config) ->
Expand Down
2 changes: 1 addition & 1 deletion deps/rabbitmq_ct_helpers/src/rabbit_ct_config_schema.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ init_schemas(App, Config) ->
run_snippets(Config) ->
{ok, [Snippets]} = file:consult(?config(conf_snippets, Config)),
ct:pal("Loaded config schema snippets: ~tp", [Snippets]),
lists:map(
lists:foreach(
fun({N, S, C, P}) ->
ok = test_snippet(Config, {snippet_id(N), S, []}, C, P, true);
({N, S, A, C, P}) ->
Expand Down

0 comments on commit aee465f

Please sign in to comment.