fix(test): flaky test cases of auth_ldap

This commit is contained in:
Shawn 2022-05-20 10:01:19 +08:00
parent e8aa53feec
commit 35d091aa1b
2 changed files with 6 additions and 2 deletions

View File

@ -48,7 +48,9 @@ init_per_group(GrpName, Cfg) ->
Cfg.
end_per_group(_GrpName, _Cfg) ->
emqx_ct_helpers:stop_apps([emqx_auth_ldap]).
emqx_ct_helpers:stop_apps([emqx_auth_ldap]),
%% clear the application envs to avoid cross-suite testcase failure
application:unload(emqx_auth_ldap).
%%--------------------------------------------------------------------
%% Cases

View File

@ -40,7 +40,9 @@ init_per_suite(Config) ->
Config.
end_per_suite(_Config) ->
emqx_ct_helpers:stop_apps([emqx_auth_ldap]).
emqx_ct_helpers:stop_apps([emqx_auth_ldap]),
%% clear the application envs to avoid cross-suite testcase failure
application:unload(emqx_auth_ldap).
check_auth(_) ->
MqttUser1 = #{clientid => <<"mqttuser1">>,