Skip to content

Commit

Permalink
Delete ejabberd_c2s_sup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Waz committed Nov 16, 2022
1 parent 1f1e4f9 commit 6c85253
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 23 deletions.
2 changes: 1 addition & 1 deletion big_tests/tests/last_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ init_per_group(valid_queries, Config0) ->
%% This check uses ejabberd_sm to get information about sessions.
escalus_ejabberd:wait_for_session_count(Config2, 0),
%% Kick "friendly" users
%% kick_everyone uses ejabberd_c2s_sup to information about client processes.
%% kick_everyone uses mongoose_c2s_sup to information about client processes.
mongoose_helper:kick_everyone(),
Config2;
init_per_group(invalid_queries, Config) ->
Expand Down
35 changes: 13 additions & 22 deletions test/mongooseim_metrics_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,19 @@ init_per_suite(C) ->
application:set_env(exometer_core, mongooseim_report_interval, 1000),
{Port, Socket} = carbon_cache_server:start(),
Sup = spawn(fun() ->
mim_ct_sup:start_link(ejabberd_sup),
Hooks =
{gen_hook,
{gen_hook, start_link, []},
permanent,
brutal_kill,
worker,
[gen_hook]},
C2SSupervisor =
{ejabberd_c2s_sup,
{ejabberd_tmp_sup, start_link, [ejabberd_c2s_sup, ejabberd_c2s]},
permanent,
infinity,
supervisor,
[ejabberd_tmp_sup]},
supervisor:start_child(ejabberd_sup, Hooks),
supervisor:start_child(ejabberd_sup, C2SSupervisor),
receive
stop ->
ok
end
end),
mim_ct_sup:start_link(ejabberd_sup),
Hooks = {gen_hook,
{gen_hook, start_link, []},
permanent,
brutal_kill,
worker,
[gen_hook]},
supervisor:start_child(ejabberd_sup, Hooks),
receive
stop ->
ok
end
end),
Reporters = get_reporters_cfg(Port),
application:set_env(exometer_core, report, Reporters),
PortServer = carbon_cache_server:wait_for_accepting(),
Expand Down

0 comments on commit 6c85253

Please sign in to comment.