From 1c9b5dabfe39c68c801145afd1124e4decdc449b Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 26 Oct 2021 01:03:41 +0800 Subject: [PATCH] remove createContext...yet Signed-off-by: tison --- expression/main_test.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/expression/main_test.go b/expression/main_test.go index 2f3bc7b49cb38..6734c2ca351cd 100644 --- a/expression/main_test.go +++ b/expression/main_test.go @@ -16,14 +16,11 @@ package expression import ( "testing" - "time" "github.com/pingcap/tidb/config" "github.com/pingcap/tidb/testkit/testmain" - "github.com/pingcap/tidb/util/mock" "github.com/pingcap/tidb/util/testbridge" "github.com/pingcap/tidb/util/timeutil" - "github.com/stretchr/testify/require" "github.com/tikv/client-go/v2/tikv" "go.uber.org/goleak" ) @@ -51,13 +48,3 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, opts...) } - -func createContext(t *testing.T) *mock.Context { - ctx := mock.NewContext() - ctx.GetSessionVars().StmtCtx.TimeZone = time.Local - sc := ctx.GetSessionVars().StmtCtx - sc.TruncateAsWarning = true - require.NoError(t, ctx.GetSessionVars().SetSystemVar("max_allowed_packet", "67108864")) - ctx.GetSessionVars().PlanColumnID = 0 - return ctx -}