chore(mria): ekka_mnesia:start/stop -> mria:start/stop

This commit is contained in:
k32 2021-10-15 17:47:49 +02:00
parent 9965d6e028
commit e14a62d4d6
9 changed files with 13 additions and 16 deletions

View File

@ -33,8 +33,8 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
ekka:stop(),
ekka_mnesia:ensure_stopped(),
ekka_mnesia:delete_schema().
mria:ensure_stopped(),
mria_mnesia:delete_schema().
t_add_delete(_) ->
Banned = #banned{who = {clientid, <<"TestClient">>},
@ -92,4 +92,3 @@ t_unused(_) ->
?assertEqual(ok, Banned ! ok),
timer:sleep(500), %% expiry timer
ok = emqx_banned:stop().

View File

@ -35,7 +35,7 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
emqx_common_test_helpers:stop_apps([]),
ekka_mnesia:delete_schema(), %% Clean emqx_banned table
mria_mnesia:delete_schema(), %% Clean emqx_banned table
ok.
t_detect_check(_) ->

View File

@ -50,8 +50,8 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
ekka:stop(),
ekka_mnesia:ensure_stopped(),
ekka_mnesia:delete_schema().
mria:ensure_stopped(),
mria_mnesia:delete_schema().
init_per_testcase(_TestCase, Config) ->
clear_tables(),
@ -194,4 +194,3 @@ trans(Fun) ->
mnesia:transaction(Fun).
trans(Fun, Args) ->
mnesia:transaction(Fun, Args).

View File

@ -42,7 +42,7 @@ all() ->
[t_auto_subscribe, t_update].
init_per_suite(Config) ->
ekka_mnesia:start(),
mria:start(),
application:stop(?APP),
meck:new(emqx_schema, [non_strict, passthrough, no_history, no_link]),
@ -159,4 +159,3 @@ check_subs([{{_, Topic}, #{subid := ?CLIENT_ID}} | Subs], List) ->
check_subs(Subs, lists:delete(Topic, List));
check_subs([_ | Subs], List) ->
check_subs(Subs, List).

View File

@ -160,7 +160,7 @@ flush({Connection, Route, Subscription}, {Received0, Sent0, Dropped0}) ->
diff(Sent, Sent0),
diff(Dropped, Dropped0)},
Ts = get_local_time(),
mria:transaction(ekka_mnesia:local_content_shard(),
mria:transaction(mria:local_content_shard(),
fun mnesia:write/1, [#mqtt_collect{timestamp = Ts, collect = Collect}]),
{Received, Sent, Dropped}.

View File

@ -50,7 +50,7 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
emqx_common_test_helpers:stop_apps([emqx_dashboard, emqx_management]),
ekka_mnesia:ensure_stopped().
mria:ensure_stopped().
set_special_configs(emqx_management) ->
emqx_config:put([emqx_management], #{listeners => [#{protocol => http, port => 8081}],

View File

@ -35,7 +35,7 @@ all() ->
init_per_suite(Config) ->
application:ensure_all_started(ekka),
ekka_mnesia:start(),
mria:start(),
Config.
end_per_suite(_Config) ->

View File

@ -54,8 +54,8 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
ekka:stop(),
ekka_mnesia:ensure_stopped(),
ekka_mnesia:delete_schema(),
mria:stop(),
mria_mnesia:delete_schema(),
meck:unload(emqx_alarm),
ok.

View File

@ -24,7 +24,7 @@ init_suite() ->
init_suite([]).
init_suite(Apps) ->
ekka_mnesia:start(),
mria:start(),
application:load(emqx_management),
emqx_common_test_helpers:start_apps(Apps ++ [emqx_dashboard], fun set_special_configs/1).