fix(mria): Fix startup sequence
This commit is contained in:
parent
887544c3c1
commit
69126fede6
|
@ -5,7 +5,7 @@
|
|||
{vsn, "5.0.0"}, % strict semver, bump manually!
|
||||
{modules, []},
|
||||
{registered, []},
|
||||
{applications, [kernel,stdlib,gproc,gen_rpc,esockd,cowboy,sasl,os_mon,jiffy,lc]},
|
||||
{applications, [kernel,stdlib,gproc,gen_rpc,mria,esockd,cowboy,sasl,os_mon,jiffy,lc]},
|
||||
{mod, {emqx_app,[]}},
|
||||
{env, []},
|
||||
{licenses, ["Apache-2.0"]},
|
||||
|
|
|
@ -27,13 +27,11 @@ all() -> emqx_common_test_helpers:all(?MODULE).
|
|||
init_per_suite(Config) ->
|
||||
application:load(emqx),
|
||||
ok = ekka:start(),
|
||||
%% for coverage
|
||||
ok = emqx_banned:mnesia(copy),
|
||||
Config.
|
||||
|
||||
end_per_suite(_Config) ->
|
||||
ekka:stop(),
|
||||
mria:ensure_stopped(),
|
||||
mria:stop(),
|
||||
mria_mnesia:delete_schema().
|
||||
|
||||
t_add_delete(_) ->
|
||||
|
|
|
@ -195,7 +195,8 @@ generate_config(SchemaModule, ConfigFile) when is_atom(SchemaModule) ->
|
|||
|
||||
-spec(stop_apps(list()) -> ok).
|
||||
stop_apps(Apps) ->
|
||||
[application:stop(App) || App <- Apps ++ [emqx, mnesia]].
|
||||
[application:stop(App) || App <- Apps ++ [emqx, mria, mnesia]],
|
||||
ok.
|
||||
|
||||
%% backward compatible
|
||||
deps_path(App, RelativePath) -> app_path(App, RelativePath).
|
||||
|
|
|
@ -41,10 +41,6 @@ init_per_testcase(_TestCase, Config) ->
|
|||
end_per_testcase(_TestCase, _Config) ->
|
||||
clear_tables().
|
||||
|
||||
t_mnesia(_) ->
|
||||
%% for coverage
|
||||
ok = emqx_router:mnesia(copy).
|
||||
|
||||
% t_add_route(_) ->
|
||||
% error('TODO').
|
||||
|
||||
|
@ -117,4 +113,3 @@ t_unexpected(_) ->
|
|||
clear_tables() ->
|
||||
lists:foreach(fun mnesia:clear_table/1,
|
||||
[emqx_route, emqx_trie, emqx_trie_node]).
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ init_per_suite(Config) ->
|
|||
|
||||
end_per_suite(_Config) ->
|
||||
ekka:stop(),
|
||||
mria:ensure_stopped(),
|
||||
mria:stop(),
|
||||
mria_mnesia:delete_schema().
|
||||
|
||||
init_per_testcase(_TestCase, Config) ->
|
||||
|
@ -60,9 +60,6 @@ init_per_testcase(_TestCase, Config) ->
|
|||
end_per_testcase(_TestCase, _Config) ->
|
||||
clear_tables().
|
||||
|
||||
t_mnesia(_) ->
|
||||
ok = ?TRIE:mnesia(copy).
|
||||
|
||||
t_insert(_) ->
|
||||
Fun = fun() ->
|
||||
?TRIE:insert(<<"sensor/1/metric/2">>),
|
||||
|
|
|
@ -50,7 +50,7 @@ init_per_suite(Config) ->
|
|||
|
||||
end_per_suite(_Config) ->
|
||||
emqx_common_test_helpers:stop_apps([emqx_dashboard, emqx_management]),
|
||||
mria:ensure_stopped().
|
||||
mria:stop().
|
||||
|
||||
set_special_configs(emqx_management) ->
|
||||
emqx_config:put([emqx_management], #{listeners => [#{protocol => http, port => 8081}],
|
||||
|
|
|
@ -35,7 +35,6 @@ start() ->
|
|||
ok = set_backtrace_depth(),
|
||||
ok = print_otp_version_warning(),
|
||||
ok = load_config_files(),
|
||||
mria:start(),
|
||||
ekka:start(),
|
||||
mria_rlog:wait_for_shards([?EMQX_MACHINE_SHARD], infinity),
|
||||
ok.
|
||||
|
|
Loading…
Reference in New Issue