test(flaky): attempt to fix more flaky tests
This commit is contained in:
parent
2c655f44e5
commit
718989c0c9
|
@ -95,6 +95,7 @@ t_check(_) ->
|
|||
?assertEqual(0, emqx_banned:info(size)).
|
||||
|
||||
t_unused(_) ->
|
||||
catch emqx_banned:stop(),
|
||||
{ok, Banned} = emqx_banned:start_link(),
|
||||
{ok, _} = emqx_banned:create(#banned{
|
||||
who = {clientid, <<"BannedClient1">>},
|
||||
|
|
|
@ -43,6 +43,7 @@ end_per_suite(_Config) ->
|
|||
init_per_testcase(Case, Config) when
|
||||
Case =:= t_max_conns_tcp; Case =:= t_current_conns_tcp
|
||||
->
|
||||
catch emqx_config_handler:stop(),
|
||||
{ok, _} = emqx_config_handler:start_link(),
|
||||
PrevListeners = emqx_config:get([listeners, tcp], #{}),
|
||||
PrevRateLimit = emqx_config:get([rate_limit], #{}),
|
||||
|
@ -64,6 +65,7 @@ init_per_testcase(Case, Config) when
|
|||
| Config
|
||||
];
|
||||
init_per_testcase(t_wss_conn, Config) ->
|
||||
catch emqx_config_handler:stop(),
|
||||
{ok, _} = emqx_config_handler:start_link(),
|
||||
PrevListeners = emqx_config:get([listeners, wss], #{}),
|
||||
emqx_config:put(
|
||||
|
@ -86,6 +88,7 @@ init_per_testcase(t_wss_conn, Config) ->
|
|||
| Config
|
||||
];
|
||||
init_per_testcase(_, Config) ->
|
||||
catch emqx_config_handler:stop(),
|
||||
{ok, _} = emqx_config_handler:start_link(),
|
||||
Config.
|
||||
|
||||
|
|
|
@ -30,11 +30,15 @@ end_per_suite(_Config) ->
|
|||
emqx_common_test_helpers:stop_apps([]).
|
||||
|
||||
all() ->
|
||||
[request_response].
|
||||
emqx_common_test_helpers:all(?MODULE).
|
||||
|
||||
request_response(_Config) ->
|
||||
request_response_per_qos(?QOS_0),
|
||||
request_response_per_qos(?QOS_1),
|
||||
t_request_response_qos0(_Config) ->
|
||||
request_response_per_qos(?QOS_0).
|
||||
|
||||
t_request_response_qos1(_Config) ->
|
||||
request_response_per_qos(?QOS_1).
|
||||
|
||||
t_request_response_qos2(_Config) ->
|
||||
request_response_per_qos(?QOS_2).
|
||||
|
||||
request_response_per_qos(QoS) ->
|
||||
|
|
Loading…
Reference in New Issue