Skip to content

Commit 112619c

Browse files
committed
fix test
Signed-off-by: crazycs520 <[email protected]>
1 parent 77777aa commit 112619c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

pkg/executor/internal/exec/indexusage_test.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ func TestIndexUsageReporter(t *testing.T) {
5252
runtimeStatsColl := sc.RuntimeStatsColl
5353

5454
// For PointGet and BatchPointGet
55-
planID := 3
56-
runtimeStatsColl.GetBasicRuntimeStats(planID, true).Record(time.Second, 2024)
57-
reporter.ReportPointGetIndexUsage(tableID, tableID, indexID, planID, 1)
55+
reporter.ReportPointGetIndexUsage(tableID, tableID, indexID, 1, 2024)
5856

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

6563
// For Index Scan
66-
planID = 4
64+
planID := 4
6765
rows := uint64(2024)
6866
zero := uint64(0)
6967
executorID := "test-executor"
@@ -87,9 +85,7 @@ func TestIndexUsageReporter(t *testing.T) {
8785
Version: statistics.PseudoVersion,
8886
RealtimeCount: 100,
8987
})
90-
planID = 4
91-
runtimeStatsColl.GetBasicRuntimeStats(planID, true).Record(time.Second, 2024)
92-
reporter.ReportPointGetIndexUsage(tableID, tableID, indexID, planID, 1)
88+
reporter.ReportPointGetIndexUsage(tableID, tableID, indexID, 1, 2024)
9389

9490
require.Eventually(t, func() bool {
9591
tk.Session().ReportUsageStats()

0 commit comments

Comments
 (0)