test: remove sleeps

This commit is contained in:
Thales Macedo Garitezi 2023-03-01 16:16:49 -03:00
parent 65c15b3fae
commit 1d5fe14a30
1 changed files with 2 additions and 6 deletions

View File

@ -417,9 +417,7 @@ t_failed_creation_then_fix(Config) ->
), ),
ValidConfigAtom = ValidConfigAtom1#{bridge_name => Name}, ValidConfigAtom = ValidConfigAtom1#{bridge_name => Name},
{ok, State} = ?PRODUCER:on_start(ResourceId, ValidConfigAtom), {ok, State} = ?PRODUCER:on_start(ResourceId, ValidConfigAtom),
%% To make sure we get unique value Time = erlang:unique_integer(),
timer:sleep(1),
Time = erlang:monotonic_time(),
BinTime = integer_to_binary(Time), BinTime = integer_to_binary(Time),
Msg = #{ Msg = #{
clientid => BinTime, clientid => BinTime,
@ -530,9 +528,7 @@ publish_helper(
{ok, _} = emqx_bridge:create( {ok, _} = emqx_bridge:create(
<<"kafka_producer">>, list_to_binary(Name), Conf <<"kafka_producer">>, list_to_binary(Name), Conf
), ),
%% To make sure we get unique value Time = erlang:unique_integer(),
timer:sleep(1),
Time = erlang:monotonic_time(),
BinTime = integer_to_binary(Time), BinTime = integer_to_binary(Time),
Partition = 0, Partition = 0,
Msg = #{ Msg = #{