From 75aee8ab0c842d296c32d6b2cd1b06bdb84e6788 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Thu, 11 Jul 2024 17:58:55 +0300 Subject: [PATCH] Throttler flaky test: explicitly disabling throttler so as to ensure it does not re-enable (#16369) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/vt/vttablet/tabletserver/throttle/throttler_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/go/vt/vttablet/tabletserver/throttle/throttler_test.go b/go/vt/vttablet/tabletserver/throttle/throttler_test.go index d9b910a3152..f544d6566be 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler_test.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler_test.go @@ -771,6 +771,16 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { assert.Len(t, checkResult.Metrics, 1) }) }) + + t.Run("Disable", func(t *testing.T) { + throttlerConfig := &topodatapb.ThrottlerConfig{ + Enabled: false, + MetricThresholds: map[string]float64{}, + AppCheckedMetrics: map[string]*topodatapb.ThrottlerConfig_MetricNames{}, + } + throttler.applyThrottlerConfig(ctx, throttlerConfig) + sleepTillThresholdApplies() + }) }) }