Skip to content

Commit

Permalink
[kernel] Adjust logger olp test-case
Browse files Browse the repository at this point in the history
  • Loading branch information
rickard-green committed Sep 7, 2023
1 parent 53b1983 commit 97f1928
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/kernel/test/logger_disk_log_h_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ op_switch_to_flush(Config) ->
flush_qlen => 300,
burst_limit_enable => false}},
ok = logger:update_handler_config(?MODULE, NewHConfig),
NumOfReqs = 1500,
NumOfReqs = 10000,
Procs = 10,
Bursts = 10,
%% It sometimes happens that the handler either gets
Expand Down Expand Up @@ -1170,13 +1170,14 @@ qlen_kill_new(Config) ->
RestartAfter = ?OVERLOAD_KILL_RESTART_AFTER,
NewHConfig =
HConfig#{config =>
DLHConfig#{overload_kill_enable=>true,
DLHConfig#{burst_limit_enable=>false,
overload_kill_enable=>true,
overload_kill_qlen=>10,
overload_kill_mem_size=>Mem0+50000,
overload_kill_restart_after=>RestartAfter}},
ok = logger:update_handler_config(?MODULE, NewHConfig),
MRef = erlang:monitor(process, Pid0),
NumOfReqs = 100,
NumOfReqs = 5000,
Procs = 4,
send_burst({n,NumOfReqs}, {spawn,Procs,0}, {chars,79}, notice),
%% send_burst({n,NumOfReqs}, seq, {chars,79}, notice),
Expand Down Expand Up @@ -1213,7 +1214,7 @@ mem_kill_new(Config) ->
overload_kill_restart_after=>RestartAfter}},
ok = logger:update_handler_config(?MODULE, NewHConfig),
MRef = erlang:monitor(process, Pid0),
NumOfReqs = 100,
NumOfReqs = 500,
Procs = 4,
send_burst({n,NumOfReqs}, {spawn,Procs,0}, {chars,79}, notice),
%% send_burst({n,NumOfReqs}, seq, {chars,79}, notice),
Expand Down Expand Up @@ -1248,7 +1249,7 @@ restart_after(Config) ->
ok = logger:update_handler_config(?MODULE, NewHConfig1),
MRef1 = erlang:monitor(process, whereis(h_proc_name())),
%% kill handler
send_burst({n,100}, {spawn,5,0}, {chars,79}, notice),
send_burst({n,1000}, {spawn,5,0}, {chars,79}, notice),
receive
{'DOWN', MRef1, _, _, _Reason1} ->
file_delete(Log),
Expand All @@ -1271,7 +1272,7 @@ restart_after(Config) ->
Pid0 = whereis(h_proc_name()),
MRef2 = erlang:monitor(process, Pid0),
%% kill handler
send_burst({n,100}, {spawn,5,0}, {chars,79}, notice),
send_burst({n,500}, {spawn,5,0}, {chars,79}, notice),
receive
{'DOWN', MRef2, _, _, _Reason2} ->
file_delete(Log),
Expand Down

0 comments on commit 97f1928

Please sign in to comment.