Skip to content

Commit

Permalink
statistics: fix two unstable tests (pingcap#27430)
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelice committed Aug 20, 2021
1 parent 90626b8 commit 7e62444
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions statistics/handle/handle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ func (s *testStatsSuite) TestBuildGlobalLevelStats(c *C) {
}

// nolint:unused
func (s *testStatsSuite) prepareForGlobalStatsWithOpts(c *C, tk *testkit.TestKit, tblName, dbName string) {
func (s *testSerialStatsSuite) prepareForGlobalStatsWithOpts(c *C, tk *testkit.TestKit, tblName, dbName string) {
tk.MustExec("create database if not exists " + dbName)
tk.MustExec("use " + dbName)
tk.MustExec("drop table if exists " + tblName)
Expand All @@ -902,7 +902,7 @@ func (s *testStatsSuite) prepareForGlobalStatsWithOpts(c *C, tk *testkit.TestKit
}

// nolint:unused
func (s *testStatsSuite) checkForGlobalStatsWithOpts(c *C, tk *testkit.TestKit, t string, p string, topn, buckets int) {
func (s *testSerialStatsSuite) checkForGlobalStatsWithOpts(c *C, tk *testkit.TestKit, t string, p string, topn, buckets int) {
delta := buckets/2 + 1
for _, isIdx := range []int{0, 1} {
c.Assert(len(tk.MustQuery(fmt.Sprintf("show stats_topn where table_name='%v' and partition_name='%v' and is_index=%v", t, p, isIdx)).Rows()), Equals, topn)
Expand All @@ -914,7 +914,7 @@ func (s *testStatsSuite) checkForGlobalStatsWithOpts(c *C, tk *testkit.TestKit,
}
}

func (s *testStatsSuite) TestAnalyzeGlobalStatsWithOpts(c *C) {
func (s *testSerialStatsSuite) TestAnalyzeGlobalStatsWithOpts(c *C) {
if israce.RaceEnabled {
c.Skip("exhaustive types test, skip race test")
}
Expand Down Expand Up @@ -953,7 +953,7 @@ func (s *testStatsSuite) TestAnalyzeGlobalStatsWithOpts(c *C) {
}
}

func (s *testStatsSuite) TestAnalyzeGlobalStatsWithOpts2(c *C) {
func (s *testSerialStatsSuite) TestAnalyzeGlobalStatsWithOpts2(c *C) {
if israce.RaceEnabled {
c.Skip("exhaustive types test, skip race test")
}
Expand Down

0 comments on commit 7e62444

Please sign in to comment.