Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: crazycs520 <[email protected]>
  • Loading branch information
crazycs520 committed Dec 3, 2024
1 parent 88dd09b commit a17669b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkg/executor/internal/exec/indexusage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ func TestIndexUsageReporter(t *testing.T) {
runtimeStatsColl := sc.RuntimeStatsColl

// For PointGet and BatchPointGet
planID := 3
runtimeStatsColl.GetBasicRuntimeStats(planID, true).Record(time.Second, 2024)
reporter.ReportPointGetIndexUsage(tableID, tableID, indexID, planID, 1)
reporter.ReportPointGetIndexUsage(tableID, tableID, indexID, 1, 2024)

require.Eventually(t, func() bool {
tk.Session().ReportUsageStats()
Expand All @@ -63,7 +61,7 @@ func TestIndexUsageReporter(t *testing.T) {
}, time.Second*5, time.Millisecond)

// For Index Scan
planID = 4
planID := 4
rows := uint64(2024)
zero := uint64(0)
executorID := "test-executor"
Expand All @@ -87,9 +85,7 @@ func TestIndexUsageReporter(t *testing.T) {
Version: statistics.PseudoVersion,
RealtimeCount: 100,
})
planID = 4
runtimeStatsColl.GetBasicRuntimeStats(planID, true).Record(time.Second, 2024)
reporter.ReportPointGetIndexUsage(tableID, tableID, indexID, planID, 1)
reporter.ReportPointGetIndexUsage(tableID, tableID, indexID, 1, 2024)

require.Eventually(t, func() bool {
tk.Session().ReportUsageStats()
Expand Down

0 comments on commit a17669b

Please sign in to comment.