From 1cf833e1c089c94de9c77d9c882f69990b18ba86 Mon Sep 17 00:00:00 2001 From: JianBo He Date: Fri, 15 Oct 2021 09:58:14 +0800 Subject: [PATCH] test(gw): ensure emqx_authn starting state --- apps/emqx_gateway/test/emqx_gateway_api_SUITE.erl | 4 ++-- apps/emqx_gateway/test/emqx_gateway_conf_SUITE.erl | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/emqx_gateway/test/emqx_gateway_api_SUITE.erl b/apps/emqx_gateway/test/emqx_gateway_api_SUITE.erl index 9e00ef43a..10cf134fa 100644 --- a/apps/emqx_gateway/test/emqx_gateway_api_SUITE.erl +++ b/apps/emqx_gateway/test/emqx_gateway_api_SUITE.erl @@ -40,11 +40,11 @@ init_per_suite(Conf) -> %% Start emqx-authn separately, due to emqx_authn_schema %% not implementing the roots/0 method, it cannot be started with %% emqx-ct-helpers at the moment. - application:ensure_all_started([emqx_authn]), + {ok, _} = application:ensure_all_started(emqx_authn), Conf. end_per_suite(Conf) -> - application:stop([emqx_authn]), + application:stop(emqx_authn), emqx_mgmt_api_test_util:end_suite([emqx_gateway]), Conf. diff --git a/apps/emqx_gateway/test/emqx_gateway_conf_SUITE.erl b/apps/emqx_gateway/test/emqx_gateway_conf_SUITE.erl index 6b6164f9a..5f8eed20a 100644 --- a/apps/emqx_gateway/test/emqx_gateway_conf_SUITE.erl +++ b/apps/emqx_gateway/test/emqx_gateway_conf_SUITE.erl @@ -37,9 +37,11 @@ init_per_suite(Conf) -> %% FIXME: Magic line. for saving gateway schema name for emqx_config emqx_config:init_load(emqx_gateway_schema, <<"gateway {}">>), emqx_common_test_helpers:start_apps([emqx_gateway]), + {ok, _} = application:ensure_all_started(emqx_authn), Conf. end_per_suite(_Conf) -> + application:stop(emqx_authn), emqx_common_test_helpers:stop_apps([emqx_gateway]). init_per_testcase(_CaseName, Conf) ->