refactor(persistent_sessions): fix coding style
This commit is contained in:
parent
8385eff98e
commit
89cd68d36f
|
@ -58,6 +58,7 @@
|
||||||
, lookup_channels/2
|
, lookup_channels/2
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
%% Test/debug interface
|
||||||
-export([ all_channels/0
|
-export([ all_channels/0
|
||||||
, all_client_ids/0
|
, all_client_ids/0
|
||||||
]).
|
]).
|
||||||
|
@ -397,11 +398,12 @@ with_channel(ClientId, Fun) ->
|
||||||
Pids -> Fun(lists:last(Pids))
|
Pids -> Fun(lists:last(Pids))
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% @doc Get all channels registed.
|
%% @doc Get all registed channel pids. Debugg/test interface
|
||||||
all_channels() ->
|
all_channels() ->
|
||||||
Pat = [{{'_', '$1'}, [], ['$1']}],
|
Pat = [{{'_', '$1'}, [], ['$1']}],
|
||||||
ets:select(?CHAN_TAB, Pat).
|
ets:select(?CHAN_TAB, Pat).
|
||||||
|
|
||||||
|
%% @doc Get all registed clientIDs. Debugg/test interface
|
||||||
all_client_ids() ->
|
all_client_ids() ->
|
||||||
Pat = [{{'$1', '_'}, [], ['$1']}],
|
Pat = [{{'$1', '_'}, [], ['$1']}],
|
||||||
ets:select(?CHAN_TAB, Pat).
|
ets:select(?CHAN_TAB, Pat).
|
||||||
|
|
|
@ -113,8 +113,9 @@ init_per_group(snabbkaffe, Config) ->
|
||||||
[ {kill_connection_process, true} | Config];
|
[ {kill_connection_process, true} | Config];
|
||||||
init_per_group(gc_tests, Config) ->
|
init_per_group(gc_tests, Config) ->
|
||||||
%% We need to make sure the system does not interfere with this test group.
|
%% We need to make sure the system does not interfere with this test group.
|
||||||
[maybe_kill_connection_process(ClientId, [{kill_connection_process, true}])
|
lists:foreach(fun(ClientId) ->
|
||||||
|| ClientId <- emqx_cm:all_client_ids()],
|
maybe_kill_connection_process(ClientId, [{kill_connection_process, true}])
|
||||||
|
end, emqx_cm:all_client_ids()),
|
||||||
emqx_common_test_helpers:stop_apps([]),
|
emqx_common_test_helpers:stop_apps([]),
|
||||||
SessionMsgEts = gc_tests_session_store,
|
SessionMsgEts = gc_tests_session_store,
|
||||||
MsgEts = gc_tests_msg_store,
|
MsgEts = gc_tests_msg_store,
|
||||||
|
|
Loading…
Reference in New Issue