From a28580248a9b4a677d0bdc1ebdb33c86c3c9696d Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Tue, 30 May 2023 11:23:17 -0300 Subject: [PATCH] test(exclusive_sub): fix test flakiness https://github.com/emqx/emqx/actions/runs/5115608275/jobs/9208594481?pr=10864#step:8:735 ``` Testing lib.emqx.emqx_access_control_SUITE: TEST COMPLETE, 4 ok, 0 failed of 4 test cases Testing lib.emqx.emqx_exclusive_sub_SUITE: Starting test, 5 test cases - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Error detected: {'EXIT',{shutdown,econnrefused}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Testing lib.emqx.emqx_exclusive_sub_SUITE: *** FAILED test case 1 of 5 *** %%% emqx_exclusive_sub_SUITE ==> t_allow_normal_sub: FAILED %%% emqx_exclusive_sub_SUITE ==> {'EXIT',{shutdown,econnrefused}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - emqx_exclusive_sub_SUITE:t_clean_session failed on line 128 Reason: {badmatch,{error,econnrefused}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Testing lib.emqx.emqx_exclusive_sub_SUITE: *** FAILED test case 2 of 5 *** %%% emqx_exclusive_sub_SUITE ==> t_clean_session: FAILED ``` To reproduce: ``` make ct-suite SUITE=apps/emqx/test/emqx_access_control_SUITE.erl,apps/emqx/test/emqx_exclusive_sub_SUITE.erl ``` --- apps/emqx/test/emqx_access_control_SUITE.erl | 3 --- apps/emqx/test/emqx_exclusive_sub_SUITE.erl | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/emqx/test/emqx_access_control_SUITE.erl b/apps/emqx/test/emqx_access_control_SUITE.erl index f5fdf223b..305eaf5eb 100644 --- a/apps/emqx/test/emqx_access_control_SUITE.erl +++ b/apps/emqx/test/emqx_access_control_SUITE.erl @@ -120,6 +120,3 @@ clientinfo(InitProps) -> }, InitProps ). - -toggle_auth(Bool) when is_boolean(Bool) -> - emqx_config:put_zone_conf(default, [auth, enable], Bool). diff --git a/apps/emqx/test/emqx_exclusive_sub_SUITE.erl b/apps/emqx/test/emqx_exclusive_sub_SUITE.erl index 79dfc9de6..1caf4cc9b 100644 --- a/apps/emqx/test/emqx_exclusive_sub_SUITE.erl +++ b/apps/emqx/test/emqx_exclusive_sub_SUITE.erl @@ -34,6 +34,7 @@ all() -> emqx_common_test_helpers:all(?MODULE). init_per_suite(Config) -> + emqx_common_test_helpers:boot_modules(all), emqx_common_test_helpers:start_apps([]), ok = ekka:start(), OldConf = emqx:get_config([zones], #{}),