From df91498778f3c3a68e737ba1799968823de0f44d Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Thu, 8 Feb 2024 15:42:10 +0800 Subject: [PATCH] refactor: better code Signed-off-by: hi-rustin --- .../handle/autoanalyze/refresher/refresher_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/statistics/handle/autoanalyze/refresher/refresher_test.go b/pkg/statistics/handle/autoanalyze/refresher/refresher_test.go index 3d7d4a0c4380e..70f813780c5cf 100644 --- a/pkg/statistics/handle/autoanalyze/refresher/refresher_test.go +++ b/pkg/statistics/handle/autoanalyze/refresher/refresher_test.go @@ -179,10 +179,11 @@ func insertFailedJobForPartitionWithStartTime( } func TestRebuildTableAnalysisJobQueue(t *testing.T) { - exec.AutoAnalyzeMinCnt = 0 + old := exec.AutoAnalyzeMinCnt defer func() { - exec.AutoAnalyzeMinCnt = 1000 + exec.AutoAnalyzeMinCnt = old }() + exec.AutoAnalyzeMinCnt = 0 store, dom := testkit.CreateMockStoreAndDomain(t) tk := testkit.NewTestKit(t, store) tk.MustExec("use test")