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