Skip to content

Commit

Permalink
Add simple unit test that no unnecesary delay is imposed
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Dec 19, 2023
1 parent 846b270 commit a16788b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/opuntia_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ groups() ->
[
{throughput_throttle, [sequence],
[
simple_test_no_delay_is_needed,
run_shaper_with_zero_does_not_shape,
run_shaper_without_consuming_does_not_delay,
run_basic_shaper_property,
Expand Down Expand Up @@ -69,6 +70,11 @@ keep_table() ->
%%% Individual Test Cases (from groups() definition)
%%%===================================================================

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

run_shaper_with_zero_does_not_shape(_) ->
Prop = ?FORALL(TokensToSpend, tokens(),
begin
Expand Down

0 comments on commit a16788b

Please sign in to comment.