diff --git a/test/ejabberd_hooks_SUITE.erl b/test/ejabberd_hooks_SUITE.erl index efc1646031..5b36665247 100644 --- a/test/ejabberd_hooks_SUITE.erl +++ b/test/ejabberd_hooks_SUITE.erl @@ -31,11 +31,6 @@ init_per_suite(C) -> end_per_suite(_C) -> application:stop(exometer_core). -init_per_testcase(_, C) -> - gen_hook:start_link(), - catch ets:new(local_config, [named_table]), - C. - a_module_fun_can_be_added(_) -> given_hooks_started(), given_module(hook_mod, fun_a, fun(_) -> ok end), @@ -242,7 +237,6 @@ exit_in_run_fold_is_ignored(_) -> const(N) -> fun(_) -> N end. given_hooks_started() -> - error_logger:tty(false), Fun = fun(all_metrics_are_global) -> false end, given_module(ejabberd_config, get_local_option, Fun), gen_hook:start_link(). diff --git a/test/gen_hook_SUITE.erl b/test/gen_hook_SUITE.erl index cde8a36e23..2f8a0e3431 100644 --- a/test/gen_hook_SUITE.erl +++ b/test/gen_hook_SUITE.erl @@ -30,7 +30,7 @@ end_per_suite(Config) -> application:stop(exometer_core), Config. -init_per_testcase(_,Config) -> +init_per_testcase(_, Config) -> Fun = fun(all_metrics_are_global) -> false end, meck:new(ejabberd_config), meck:expect(ejabberd_config, get_local_option, Fun), @@ -50,7 +50,7 @@ single_handler_can_be_added_and_removed(_) -> PlusHandlerFn = get_hook_handler(mod1, plus, fun hook_handler_plus/3), MultiplyHandlerFn = get_hook_handler(mod2, multiply, fun hook_handler_multiply/3), %% check that there are no hook handlers added yet - ?assertEqual([],get_handlers_for_all_hooks()), + ?assertEqual([], get_handlers_for_all_hooks()), %% add various hook handlers ?assertEqual(ok, gen_hook:add_handler(calculate, ?HOOK_TAG1, MultiplyHandlerFn, #{id => 2}, 2)),