Skip to content

Commit

Permalink
Make ra_systems_sup restart intensity configurable for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoguin committed Sep 29, 2022
1 parent 211331e commit 32aa5de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ra_systems_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ start_system(#{name := Name,


init([]) ->
SupFlags = #{strategy => one_for_one, intensity => 1, period => 5},
%% This is not something we want to expose. It helps test suites
%% that crash Ra systems on purpose and may end up crashing
%% the systems faster than we normally allow.
{Intensity, Period} = application:get_env(ra, ra_systems_sup_intensity, {1, 5}),
SupFlags = #{strategy => one_for_one, intensity => Intensity, period => Period},
{ok, {SupFlags, []}}.


Expand Down

0 comments on commit 32aa5de

Please sign in to comment.