executor: stable test not to automatically gc (#32520)

close pingcap/tidb#32519
This commit is contained in:
Weizhen Wang
2022-02-22 17:05:43 +08:00
committed by GitHub
parent f60a589147
commit de1bc57790

View File

@ -18,6 +18,7 @@ import (
"context"
"fmt"
"runtime"
"runtime/debug"
"testing"
"github.com/pingcap/tidb/executor"
@ -26,6 +27,8 @@ import (
)
func TestPBMemoryLeak(t *testing.T) {
debug.SetGCPercent(1000)
defer debug.SetGCPercent(100)
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)