Skip to content

Commit

Permalink
Test no delay works for all time units
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Jan 2, 2024
1 parent be2ec8d commit 09800a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/opuntia_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ keep_table() ->
%%%===================================================================

simple_test_no_delay_is_needed(_) ->
Units = [second, millisecond, microsecond, nanosecond, native],
[ simple_test_no_delay_is_needed_for_unit(Unit) || Unit <- Units ].

simple_test_no_delay_is_needed_for_unit(Unit) ->
FoldFun = fun(N, ShIn) -> {ShOut, 0} = opuntia:update(ShIn, N), ShOut end,
Config = #{bucket_size => 100000, rate => 10000, time_unit => millisecond, start_full => true},
Config = #{bucket_size => 100000, rate => 10000, time_unit => Unit, start_full => true},
Shaper = opuntia:new(Config),
lists:foldl(FoldFun, Shaper, lists:duplicate(10000, 1)).

Expand Down

0 comments on commit 09800a7

Please sign in to comment.