Skip to content

Commit

Permalink
Start cover using cover:start()
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Jul 25, 2024
1 parent 770c761 commit cf9598c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ejabberd_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,11 @@ maybe_start_cover() ->
case {os:getenv("MONGOOSE_COVER_ON_START"), whereis(cover_server)} of
{"true", undefined} ->
error_logger:warning_msg("Starting cover. It will slowdown the system.", []),
{ok, _} = cover:start(node()),
ok = cover:local_only(),

Check warning on line 196 in src/ejabberd_app.erl

View check run for this annotation

Codecov / codecov/patch

src/ejabberd_app.erl#L195-L196

Added lines #L195 - L196 were not covered by tests
%% We need to change group leader because application:stop/1 would stop cover otherwise.
%% (Application master stops every process based on group_leader).
%% The killing logic is in application_master:kill_children/1
erlang:group_leader(whereis(user), whereis(cover_server)),
ok = cover:local_only(),
Dir = filename:join(code:lib_dir(mongooseim), ebin),
cover:compile_beam_directory(Dir);

Check warning on line 202 in src/ejabberd_app.erl

View check run for this annotation

Codecov / codecov/patch

src/ejabberd_app.erl#L200-L202

Added lines #L200 - L202 were not covered by tests
_ ->
Expand Down

0 comments on commit cf9598c

Please sign in to comment.