Skip to content

Commit

Permalink
tests: use high burst value in limiter.
Browse files Browse the repository at this point in the history
Use the highest MaximalQPS of all traffic profiles as burst otherwise actual traffic may be accidentally limited.
For example, if burst is set to 200 it is unlikely traffic can achieve higher than 200.

Signed-off-by: Jiayin Mao <[email protected]>
  • Loading branch information
jmao-dd committed Jan 11, 2025
1 parent 75f2ae1 commit 47bd258
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/robustness/traffic/traffic.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ func SimulateTraffic(ctx context.Context, t *testing.T, lg *zap.Logger, clus *e2

lm := identity.NewLeaseIDStorage()
reports := []report.ClientReport{}
limiter := rate.NewLimiter(rate.Limit(profile.MaximalQPS), 200)
// Use the highest MaximalQPS of all traffic profiles as burst otherwise actual traffic may be accidentally limited
limiter := rate.NewLimiter(rate.Limit(profile.MaximalQPS), 1000)

cc, err := client.NewRecordingClient(endpoints, ids, baseTime)
require.NoError(t, err)
Expand Down

0 comments on commit 47bd258

Please sign in to comment.