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) #16615

Merged
merged 3 commits into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -125,6 +125,7 @@ var _ = SerialSuites(&testFlushSuite{})
var _ = SerialSuites(&testAutoRandomSuite{&baseTestSuite{}})
var _ = SerialSuites(&testClusterTableSuite{})
var _ = SerialSuites(&testSuite10{&baseTestSuite{}})
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 @@ -123,7 +123,11 @@ func (s *testSuite) TestExplainMetricTable(c *C) {
`MemTableScan_5 10000.00 root table:CLUSTER_LOG start_time:2019-12-23 16:10:13, end_time:2019-12-23 16:30:13, node_types:["high_cpu_1","high_memory_1"]`))
}

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 @@ -5436,7 +5436,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 @@ -5490,7 +5490,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 @@ -5514,7 +5514,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 @@ -5637,7 +5637,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