Skip to content

Commit

Permalink
fix(distribution): add more tests for expected behaviour
Browse files Browse the repository at this point in the history
Part of #81
  • Loading branch information
nvloff-f3 committed Jun 10, 2024
1 parent 48f6dbc commit 817300c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions internal/trigger/api/iteration_distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ func TestRegularRateDistribution(t *testing.T) {
rate: 10,
expectedDistributedRates: []int{5, 5},
},
{
iterationDuration: 215 * time.Millisecond,
rate: 1,
expectedDistributedRates: []int{0, 1},
},
{
iterationDuration: 299 * time.Millisecond,
rate: 1,
expectedDistributedRates: []int{0, 1},
},

{
iterationDuration: 300 * time.Millisecond,
rate: 1,
expectedDistributedRates: []int{0, 0, 1},
},
{
iterationDuration: 900 * time.Millisecond,
rate: 7,
Expand Down

0 comments on commit 817300c

Please sign in to comment.