Merge pull request #10882 from thalesmg/test-flakiness-20230530
attempts to reduce test flakiness
This commit is contained in:
commit
5c8b73e829
|
@ -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),
|
||||||
|
|
||||||
|
|
|
@ -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(),
|
||||||
|
|
|
@ -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]},
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue