Skip to content

Commit

Permalink
Merge pull request #4147 from esl/fix-small-tests
Browse files Browse the repository at this point in the history
Fix minor issues with small tests
  • Loading branch information
NelsonVides authored Oct 12, 2023
2 parents 51dbdd1 + f0173c0 commit 4e5291b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions test/acl_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ host_type_test_cases() ->

init_per_suite(Config) ->
{ok, _} = application:ensure_all_started(jid),
Config.
async_helper:start(Config, mongoose_domain_sup, start_link, [[], []]).

end_per_suite(_Config) ->
meck:unload(),
ok.
end_per_suite(Config) ->
async_helper:stop_all(Config).

init_per_group(dynamic_domains, Config) ->
[{dynamic_domains, true}|Config];
Expand Down Expand Up @@ -299,10 +298,10 @@ given_registered_domains(Config, DomainsList) ->
register_static_domains(DomainsList) ->
mongoose_config:set_opt(hosts, DomainsList),
mongoose_config:set_opt(host_types, []),
mongoose_domain_sup:start_link().
mongoose_domain_sup:restart_core([]).

register_dynamic_domains(DomainsList) ->
mongoose_config:set_opt(hosts, []),
mongoose_config:set_opt(host_types, [<<"test type">>, <<"empty type">>]),
mongoose_domain_sup:start_link(),
mongoose_domain_sup:restart_core([]),
[mongoose_domain_core:insert(Domain, <<"test type">>, test) || Domain <- DomainsList].
2 changes: 1 addition & 1 deletion test/ejabberd_sm_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ n(Node) ->


is_redis_running() ->
case eredis:start_link() of
case eredis:start_link([{host, "127.0.0.1"}]) of
{ok, Client} ->
Result = eredis:q(Client, [<<"PING">>], 5000),
eredis:stop(Client),
Expand Down

0 comments on commit 4e5291b

Please sign in to comment.