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

statistics: fix two unstable tests #27430

Merged
merged 5 commits into from
Aug 20, 2021
Merged
Changes from 1 commit
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
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