Skip to content

Commit a20caf6

Browse files
committed
Fix UT failures
Signed-off-by: Stuti Biyani <[email protected]>
1 parent b30979c commit a20caf6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

go/vt/vttablet/tabletserver/querythrottler/query_throttler_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ func TestQueryThrottler_DryRunMode(t *testing.T) {
273273
strategy: mockStrategy,
274274
env: env,
275275
stats: Stats{
276-
requestsTotal: env.Exporter().NewCountersWithMultiLabels(_queryThrottlerAppName+"Requests", "TestThrottler requests", []string{"strategy", "workload", "priority"}),
277-
requestsThrottled: env.Exporter().NewCountersWithMultiLabels(_queryThrottlerAppName+"Throttled", "TestThrottler throttled", []string{"strategy", "workload", "priority", "metric_name", "metric_value", "dry_run"}),
278-
totalLatency: env.Exporter().NewMultiTimings(_queryThrottlerAppName+"TotalLatencyMs", "Total latency of QueryThrottler.Throttle in milliseconds", []string{"strategy", "workload", "priority"}),
279-
evaluateLatency: env.Exporter().NewMultiTimings(_queryThrottlerAppName+"EvaluateLatencyMs", "Latency from Throttle entry to completion of Evaluate in milliseconds", []string{"strategy", "workload", "priority"}),
276+
requestsTotal: env.Exporter().NewCountersWithMultiLabels(_queryThrottlerAppName+"Requests", "TestThrottler requests", []string{"Strategy", "Workload", "Priority"}),
277+
requestsThrottled: env.Exporter().NewCountersWithMultiLabels(_queryThrottlerAppName+"Throttled", "TestThrottler throttled", []string{"Strategy", "Workload", "Priority", "MetricName", "MetricValue", "DryRun"}),
278+
totalLatency: env.Exporter().NewMultiTimings(_queryThrottlerAppName+"TotalLatencyMs", "Total latency of QueryThrottler.Throttle in milliseconds", []string{"Strategy", "Workload", "Priority"}),
279+
evaluateLatency: env.Exporter().NewMultiTimings(_queryThrottlerAppName+"EvaluateLatencyMs", "Latency from Throttle entry to completion of Evaluate in milliseconds", []string{"Strategy", "Workload", "Priority"}),
280280
},
281281
}
282282

@@ -322,8 +322,8 @@ func TestQueryThrottler_DryRunMode(t *testing.T) {
322322
}
323323

324324
// Verify stats expectation
325-
totalRequests := stats.CounterForDimension(iqt.stats.requestsTotal, "strategy")
326-
throttledRequests := stats.CounterForDimension(iqt.stats.requestsThrottled, "strategy")
325+
totalRequests := stats.CounterForDimension(iqt.stats.requestsTotal, "Strategy")
326+
throttledRequests := stats.CounterForDimension(iqt.stats.requestsThrottled, "Strategy")
327327
require.Equal(t, tt.expectedTotalRequests, totalRequests.Counts()["MockStrategy"], "Total requests should match expected")
328328
require.Equal(t, tt.expectedThrottledRequests, throttledRequests.Counts()["MockStrategy"], "Throttled requests should match expected")
329329
})

0 commit comments

Comments
 (0)