Increase request id length limit up to 64 (#146)

* Increase request id length limit up to 64

According to rbkmoney/coredocs#226.

* Bump joint worker timeout in tests

So they would flap less frequently, hopefully.
This commit is contained in:
Andrew Mayorov 2020-08-26 19:02:05 +03:00 committed by GitHub
parent d106ef66bd
commit feadc0d103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ make_ctx(RpcId = #{span_id := _, parent_id := _, trace_id := _}, Meta, Deadline)
make_ctx(RpcId, Meta, Deadline) ->
error(badarg, [RpcId, Meta, Deadline]).
check_req_id_limit(_Type, Id) when is_binary(Id) andalso byte_size(Id) =< 32 ->
check_req_id_limit(_Type, Id) when is_binary(Id) andalso byte_size(Id) =< 64 ->
ok;
check_req_id_limit(Type, Id) ->
error(badarg, [Type, Id]).

View File

@ -72,7 +72,7 @@ do(ID, Successfulness) ->
catch woody_joint_workers:do(workers, {ID, Successfulness}, Task, woody_deadline:from_timeout(WorkerTimeout)).
% если уменьшать, то могут быть ложные срабатывания
-define(timeout_k, 10).
-define(timeout_k, 20).
task_timeouts(success) ->
{?timeout_k * 1, ?timeout_k * 3};
task_timeouts(fail) ->