Merge pull request #10882 from thalesmg/test-flakiness-20230530

attempts to reduce test flakiness
This commit is contained in:
Thales Macedo Garitezi 2023-05-30 13:39:36 -03:00 committed by GitHub
commit 5c8b73e829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View File

@ -145,11 +145,12 @@ t_kick(_) ->
t_session_taken(_) -> t_session_taken(_) ->
erlang:process_flag(trap_exit, true), erlang:process_flag(trap_exit, true),
Topic = <<"t/banned">>, Topic = <<"t/banned">>,
ClientId2 = <<"t_session_taken">>, ClientId2 = emqx_guid:to_hexstr(emqx_guid:gen()),
MsgNum = 3, MsgNum = 3,
Connect = fun() -> Connect = fun() ->
ClientId = emqx_guid:to_hexstr(emqx_guid:gen()),
{ok, C} = emqtt:start_link([ {ok, C} = emqtt:start_link([
{clientid, <<"client1">>}, {clientid, ClientId},
{proto_ver, v5}, {proto_ver, v5},
{clean_start, false}, {clean_start, false},
{properties, #{'Session-Expiry-Interval' => 120}} {properties, #{'Session-Expiry-Interval' => 120}}
@ -188,9 +189,9 @@ t_session_taken(_) ->
end, end,
15_000 15_000
), ),
Publish(),
C2 = Connect(), C2 = Connect(),
Publish(),
?assertEqual(MsgNum, length(receive_messages(MsgNum + 1))), ?assertEqual(MsgNum, length(receive_messages(MsgNum + 1))),
ok = emqtt:disconnect(C2), ok = emqtt:disconnect(C2),

View File

@ -93,6 +93,7 @@ end_per_group(_Group, _Config) ->
emqx_common_test_helpers:stop_apps([]). emqx_common_test_helpers:stop_apps([]).
init_per_suite(Config) -> init_per_suite(Config) ->
emqx_common_test_helpers:clear_screen(),
Config. Config.
end_per_suite(_Config) -> end_per_suite(_Config) ->
@ -442,7 +443,7 @@ t_connected_client_count_persistent(Config) when is_list(Config) ->
emqx_cm_process_down emqx_cm_process_down
] ]
), ),
?assertEqual(0, emqx_cm:get_connected_client_count()), ?retry(_Sleep = 100, _Retries = 20, ?assertEqual(0, emqx_cm:get_connected_client_count())),
ok; ok;
t_connected_client_count_persistent({'end', _Config}) -> t_connected_client_count_persistent({'end', _Config}) ->
snabbkaffe:stop(), snabbkaffe:stop(),

View File

@ -2,7 +2,7 @@
{application, emqx_rule_engine, [ {application, emqx_rule_engine, [
{description, "EMQX Rule Engine"}, {description, "EMQX Rule Engine"},
% strict semver, bump manually! % strict semver, bump manually!
{vsn, "5.0.18"}, {vsn, "5.0.19"},
{modules, []}, {modules, []},
{registered, [emqx_rule_engine_sup, emqx_rule_engine]}, {registered, [emqx_rule_engine_sup, emqx_rule_engine]},
{applications, [kernel, stdlib, rulesql, getopt, emqx_ctl]}, {applications, [kernel, stdlib, rulesql, getopt, emqx_ctl]},

View File

@ -1,6 +1,6 @@
{application, emqx_ee_bridge, [ {application, emqx_ee_bridge, [
{description, "EMQX Enterprise data bridges"}, {description, "EMQX Enterprise data bridges"},
{vsn, "0.1.14"}, {vsn, "0.1.15"},
{registered, []}, {registered, []},
{applications, [ {applications, [
kernel, kernel,