anchor.diff:  %% Check if stress test should be stopped because of error.
   %% @end
   %%--------------------------------------------------------------------
  --spec check_error(Rep :: integer(), FailedReps :: map()) -> integer() | permanent_error.
  +-spec check_error(Rep :: integer(), FailedReps :: map()) -> ok | error.
  +check_error(Rep, _FailedReps) when Rep < ?STRESS_ERRORS_TO_STOP ->
  +    ok;
   check_error(Rep, FailedReps) ->
       check_error(Rep - 1, Rep, FailedReps).
   
  -%%--------------------------------------------------------------------
  -%% @private
  -%% @doc
  -%% Check if stress test should be stopped because of error.
  -%% @end
  -%%--------------------------------------------------------------------
  --spec check_error(Rep :: integer(), Start :: integer(), FailedReps :: map()) -> integer() | permanent_error.
   check_error(Check, Start, _FailedReps) when Start - ?STRESS_ERRORS_TO_STOP > Check ->
  -    permanent_error;
  -check_error(0, Start, _FailedReps) ->
  -    Start - 1;
  +    error;
   check_error(Check, Start, FailedReps) ->
       case maps:is_key(integer_to_binary(Check), FailedReps) of
           false ->
  -            Start - Check - 1;
  +            ok;
           _ ->
               check_error(Check - 1, Start, FailedReps)
       end.
  
positive.code:                        TestTime = timer:now_diff(Now, StartTime) div 1000000,
                         TimeLeft = TimeLimit - TestTime,
  
                         [{cases, Cases}] = ets:lookup(?STRESS_ETS_NAME, cases),
                         ZippedFR = lists:zip(FailedReps, Cases),
                         ErrorsHistoryOK = lists:foldl(fun({FR, Case}, Acc) ->
                             CheckAns = check_error(Rep, FR),
                             ets:insert(?STRESS_ETS_NAME, {{history, Case}, {Rep, maps:size(FR), CheckAns}}),
                             case Acc of
                                 permanent_error ->
                                     CheckAns;
                                 _ ->
                                     Acc
                             end
                         end, permanent_error, ZippedFR),
  
                         case (TimeLeft > 0) and (ErrorsHistoryOK =/= permanent_error) of
                             true ->
                                 ct:print("SUITE: ~p~nCASE: ~p~nCONFIG: ~p~nREPEAT: ~p, TEST TIME ~p sek, TIME LEFT ~p sek",
                                     [SuiteName, CaseName, ConfigName, Rep, TestTime, TimeLeft]),
  
negative.code: -define(STRESS_NO_CLEARING_ENV_VARIABLE, "stress_no_clearing").
  -define(STRESS_TIME_ENV_VARIABLE, "stress_time").
  -define(STRESS_DEFAULT_TIME, timer:hours(3) div 1000).
  -define(STRESS_ERRORS_TO_STOP, 100).
  -define(STRESS_ETS_NAME, stress_ets).
  -define(STRESS_TIMEOUT_EXTENSION_SECONDS, 600). % extension of ct timeout to let running tests end
  
  