Skip to content

Commit

Permalink
remove createContext...yet
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Oct 25, 2021
1 parent bdba1b1 commit 1c9b5da
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions expression/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
}

0 comments on commit 1c9b5da

Please sign in to comment.