From de1bc577901eb5fb0f2667f765d53dbdbd2ba9c3 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Tue, 22 Feb 2022 17:05:43 +0800 Subject: [PATCH] executor: stable test not to automatically gc (#32520) close pingcap/tidb#32519 --- executor/memory_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/executor/memory_test.go b/executor/memory_test.go index 3dc284672fb5a..b4fdbaeceae7e 100644 --- a/executor/memory_test.go +++ b/executor/memory_test.go @@ -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)