test: make ticket messages unique across IFT runs via system_time
CI / test (push) Successful in 6m17s
CI / deploy-ift (push) Successful in 3m8s
CI / e2e-ift (push) Successful in 1m24s
CI / deploy-stage (push) Successful in 2m48s
CI / e2e-stage (push) Successful in 1m42s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-20 14:39:20 +03:00
parent fc38f63497
commit dcb5163946
+5 -2
View File
@@ -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() ->