test: avoid inter-suite flakiness

This test runs most of the time fine in CI.  But, if run alone
locally, will fail consistently because the default `acl.conf` has a
catch-all `{allow, all}` clause.  Probably another suite that runs
before this in CI unloads that and everything seems fine.
This commit is contained in:
Thales Macedo Garitezi 2022-09-15 18:08:20 -03:00
parent f2f14573d3
commit 6204481d71
1 changed files with 4 additions and 0 deletions

View File

@ -52,10 +52,14 @@ all() ->
init_per_suite(Cfg) -> init_per_suite(Cfg) ->
emqx_ct_helpers:start_apps([emqx_auth_mongo], fun set_special_confs/1), emqx_ct_helpers:start_apps([emqx_auth_mongo], fun set_special_confs/1),
init_mongo_data(), init_mongo_data(),
%% avoid inter-suite flakiness
ok = emqx_mod_acl_internal:unload([]),
Cfg. Cfg.
end_per_suite(_Cfg) -> end_per_suite(_Cfg) ->
deinit_mongo_data(), deinit_mongo_data(),
%% avoid inter-suite flakiness
ok = emqx_mod_acl_internal:load([]),
emqx_ct_helpers:stop_apps([emqx_auth_mongo]). emqx_ct_helpers:stop_apps([emqx_auth_mongo]).
set_special_confs(emqx) -> set_special_confs(emqx) ->