style: format emqx files

This commit is contained in:
Thales Macedo Garitezi 2022-04-20 07:52:28 -03:00
parent 6e819b5ecb
commit 6814f04b10
No known key found for this signature in database
GPG Key ID: DD279F8152A9B6DD
2 changed files with 8 additions and 5 deletions

View File

@ -488,8 +488,9 @@ is_tcp_server_available(Host, Port, Timeout) ->
start_ekka() -> start_ekka() ->
try mnesia_hook:module_info() of try mnesia_hook:module_info() of
_ -> ekka:start() _ -> ekka:start()
catch _:_ -> catch
%% Falling back to using Mnesia DB backend. _:_ ->
application:set_env(mria, db_backend, mnesia), %% Falling back to using Mnesia DB backend.
ekka:start() application:set_env(mria, db_backend, mnesia),
ekka:start()
end. end.

View File

@ -223,7 +223,9 @@ t_callback_crash(_Config) ->
Opts = #{rawconf_with_defaults => true}, Opts = #{rawconf_with_defaults => true},
ok = emqx_config_handler:add_handler(CrashPath, ?MODULE), ok = emqx_config_handler:add_handler(CrashPath, ?MODULE),
Old = emqx:get_raw_config(CrashPath), Old = emqx:get_raw_config(CrashPath),
?assertMatch({error, {config_update_crashed, _}}, emqx:update_config(CrashPath, <<"89%">>, Opts)), ?assertMatch(
{error, {config_update_crashed, _}}, emqx:update_config(CrashPath, <<"89%">>, Opts)
),
New = emqx:get_raw_config(CrashPath), New = emqx:get_raw_config(CrashPath),
?assertEqual(Old, New), ?assertEqual(Old, New),
ok = emqx_config_handler:remove_handler(CrashPath), ok = emqx_config_handler:remove_handler(CrashPath),