test: make ticket messages unique across IFT runs via system_time
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -338,10 +338,13 @@ unique_email(Prefix) ->
|
||||
|
||||
%% Уникальное сообщение тикета на прогон (IFT: иначе дедуп по error_hash
|
||||
%% возвращает чужой reporter_id и list/get своих тикетов падает).
|
||||
%% system_time — стабильно уникален между контейнерами; unique_integer —
|
||||
%% различает вызовы внутри одного прогона (monotonic сбрасывается при старте BEAM).
|
||||
-spec unique_ticket_message(binary()) -> binary().
|
||||
unique_ticket_message(Prefix) ->
|
||||
Unique = integer_to_binary(erlang:unique_integer([positive, monotonic])),
|
||||
<<Prefix/binary, " ", Unique/binary>>.
|
||||
Time = integer_to_binary(erlang:system_time()),
|
||||
Seq = integer_to_binary(erlang:unique_integer([positive, monotonic])),
|
||||
<<Prefix/binary, " ", Time/binary, "-", Seq/binary>>.
|
||||
|
||||
-spec future_date() -> calendar:datetime().
|
||||
future_date() ->
|
||||
|
||||
Reference in New Issue
Block a user