Skip to content

Commit

Permalink
test: make several slow package unit test support run parallel (pingc…
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv authored and zz-jason committed Nov 14, 2019
1 parent f94eac0 commit 2aa571b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion planner/core/prepare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ import (
)

var _ = Suite(&testPrepareSuite{})
var _ = SerialSuites(&testPrepareSerialSuite{})

type testPrepareSuite struct {
}

type testPrepareSerialSuite struct {
}

func (s *testPrepareSuite) TestPrepareCache(c *C) {
defer testleak.AfterTest(c)()
store, dom, err := newStoreWithBootstrap()
Expand Down Expand Up @@ -311,7 +315,7 @@ func (s *testPrepareSuite) TestPrepareOverMaxPreparedStmtCount(c *C) {
}

// unit test for issue https://github.com/pingcap/tidb/issues/8518
func (s *testPrepareSuite) TestPrepareTableAsNameOnGroupByWithCache(c *C) {
func (s *testPrepareSerialSuite) TestPrepareTableAsNameOnGroupByWithCache(c *C) {
defer testleak.AfterTest(c)()
store, dom, err := newStoreWithBootstrap()
c.Assert(err, IsNil)
Expand Down
2 changes: 1 addition & 1 deletion session/pessimistic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"github.com/pingcap/tidb/util/testleak"
)

var _ = Suite(&testPessimisticSuite{})
var _ = SerialSuites(&testPessimisticSuite{})

type testPessimisticSuite struct {
cluster *mocktikv.Cluster
Expand Down
2 changes: 1 addition & 1 deletion session/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import (
"google.golang.org/grpc"
)

var _ = Suite(&testSessionSuite{})
var _ = SerialSuites(&testSessionSuite{})

type testSessionSuite struct {
cluster *mocktikv.Cluster
Expand Down

0 comments on commit 2aa571b

Please sign in to comment.