From 47bd258fc836b2a31db528ccdfde97cc43d65dda Mon Sep 17 00:00:00 2001 From: Jiayin Mao Date: Sat, 11 Jan 2025 21:15:32 +0000 Subject: [PATCH] tests: use high burst value in limiter. 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 --- tests/robustness/traffic/traffic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/robustness/traffic/traffic.go b/tests/robustness/traffic/traffic.go index c2de307218b..1b950b54731 100644 --- a/tests/robustness/traffic/traffic.go +++ b/tests/robustness/traffic/traffic.go @@ -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)