Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix unit test and make test running serially. #16525

Merged
merged 3 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions executor/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ var _ = Suite(&testMemTableReaderSuite{&testClusterTableBase{}})
var _ = SerialSuites(&testFlushSuite{})
var _ = SerialSuites(&testAutoRandomSuite{&baseTestSuite{}})
var _ = SerialSuites(&testClusterTableSuite{})
var _ = SerialSuites(&testPrepareSerialSuite{&baseTestSuite{}})

type testSuite struct{ *baseTestSuite }
type testSuiteP1 struct{ *baseTestSuite }
Expand Down
6 changes: 5 additions & 1 deletion executor/explainfor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ func (s *testSuite) TestInspectionRuleTable(c *C) {
`MemTableScan_5 10000.00 root table:INSPECTION_RULES skip_request: true`))
}

func (s *testSuite) TestExplainForConnPlanCache(c *C) {
type testPrepareSerialSuite struct {
*baseTestSuite
}

func (s *testPrepareSerialSuite) TestExplainForConnPlanCache(c *C) {
tk := testkit.NewTestKit(c, s.store)
orgEnable := core.PreparedPlanCacheEnabled()
defer func() {
Expand Down
8 changes: 4 additions & 4 deletions expression/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5443,7 +5443,7 @@ func (s *testIntegrationSuite) TestCastStrToInt(c *C) {
}
}

func (s *testIntegrationSuite) TestIssue16205(c *C) {
func (s *testIntegrationSerialSuite) TestIssue16205(c *C) {
tk := testkit.NewTestKit(c, s.store)
orgEnable := plannercore.PreparedPlanCacheEnabled()
defer func() {
Expand Down Expand Up @@ -5497,7 +5497,7 @@ func (s *testIntegrationSuite) TestIssue14146(c *C) {
tk.MustQuery("select * from tt").Check(testkit.Rows("<nil>"))
}

func (s *testIntegrationSuite) TestCacheRegexpr(c *C) {
func (s *testIntegrationSerialSuite) TestCacheRegexpr(c *C) {
tk := testkit.NewTestKit(c, s.store)
orgEnable := plannercore.PreparedPlanCacheEnabled()
defer func() {
Expand All @@ -5521,7 +5521,7 @@ func (s *testIntegrationSuite) TestCacheRegexpr(c *C) {
tk.MustQuery("execute stmt1 using @a").Check(testkit.Rows("R1"))
}

func (s *testIntegrationSuite) TestCacheRefineArgs(c *C) {
func (s *testIntegrationSerialSuite) TestCacheRefineArgs(c *C) {
tk := testkit.NewTestKit(c, s.store)
orgEnable := plannercore.PreparedPlanCacheEnabled()
defer func() {
Expand Down Expand Up @@ -5644,7 +5644,7 @@ func (s *testIntegrationSuite) TestCoercibility(c *C) {
}, "from t")
}

func (s *testIntegrationSuite) TestCacheConstEval(c *C) {
func (s *testIntegrationSerialSuite) TestCacheConstEval(c *C) {
tk := testkit.NewTestKit(c, s.store)
orgEnable := plannercore.PreparedPlanCacheEnabled()
defer func() {
Expand Down
2 changes: 1 addition & 1 deletion planner/core/prepare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func (s *testPrepareSuite) TestPrepareForGroupByItems(c *C) {
tk.MustQuery("execute s1 using @a;").Check(testkit.Rows("3"))
}

func (s *testPrepareSuite) TestPrepareCacheForPartition(c *C) {
func (s *testPrepareSerialSuite) TestPrepareCacheForPartition(c *C) {
defer testleak.AfterTest(c)()
store, dom, err := newStoreWithBootstrap()
c.Assert(err, IsNil)
Expand Down