Skip to content

Commit

Permalink
fix variable name typo
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
  • Loading branch information
shlomi-noach committed Feb 10, 2025
1 parent 18bab44 commit 26e3fb1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func TestThrottlerAfterMetricsCollected(t *testing.T) {
})
t.Run("validating throttled apps", func(t *testing.T) {
status := throttleStatus(t, primaryTablet)
assert.Contains(t, status.ThrottledApps, throttlerapp.TestingAlwaysThrottlerName.String())
assert.Contains(t, status.ThrottledApps, throttlerapp.TestingAlwaysThrottledName.String())
})
t.Run("validating primary check self", func(t *testing.T) {
resp, err := throttleCheckSelf(primaryTablet)
Expand Down
4 changes: 2 additions & 2 deletions go/vt/vttablet/tabletserver/throttle/throttler.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func (throttler *Throttler) applyThrottlerConfig(ctx context.Context, throttlerC
throttler.ThrottleApp(appRule.Name, protoutil.TimeFromProto(appRule.ExpiresAt).UTC(), appRule.Ratio, appRule.Exempt)
}
for app := range throttler.throttledAppsSnapshot() {
if app == throttlerapp.TestingAlwaysThrottlerName.String() {
if app == throttlerapp.TestingAlwaysThrottledName.String() {
// Never remove this app
continue
}
Expand Down Expand Up @@ -625,7 +625,7 @@ func (throttler *Throttler) Open() error {
throttler.initConfig()
throttler.pool.Open(throttler.env.Config().DB.AppWithDB(), throttler.env.Config().DB.DbaWithDB(), throttler.env.Config().DB.AppDebugWithDB())

throttler.ThrottleApp(throttlerapp.TestingAlwaysThrottlerName.String(), time.Now().Add(time.Hour*24*365*10), DefaultThrottleRatio, false)
throttler.ThrottleApp(throttlerapp.TestingAlwaysThrottledName.String(), time.Now().Add(time.Hour*24*365*10), DefaultThrottleRatio, false)

go throttler.retryReadAndApplyThrottlerConfig(ctx)

Expand Down
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletserver/throttle/throttler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func newTestThrottler() *Throttler {
}
return selfMetrics
}
throttler.ThrottleApp(throttlerapp.TestingAlwaysThrottlerName.String(), time.Now().Add(time.Hour*24*365*10), DefaultThrottleRatio, false)
throttler.ThrottleApp(throttlerapp.TestingAlwaysThrottledName.String(), time.Now().Add(time.Hour*24*365*10), DefaultThrottleRatio, false)

return throttler
}
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletserver/throttle/throttlerapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const (
SchemaTrackerName Name = "schema-tracker"

TestingName Name = "test"
TestingAlwaysThrottlerName Name = "always-throttled-app"
TestingAlwaysThrottledName Name = "always-throttled-app"
)

var (
Expand Down

0 comments on commit 26e3fb1

Please sign in to comment.