Skip to content

Commit

Permalink
statistics: refactor test package
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Oct 13, 2023
1 parent 318e82b commit 69711cd
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 46 deletions.
13 changes: 12 additions & 1 deletion pkg/statistics/handle/globalstats/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,28 @@ go_library(
go_test(
name = "globalstats_test",
timeout = "short",
srcs = ["topn_bench_test.go"],
srcs = [
"globalstats_test.go",
"main_test.go",
"topn_bench_test.go",
],
embed = [":globalstats"],
flaky = True,
shard_count = 14,
deps = [
"//pkg/config",
"//pkg/parser/model",
"//pkg/parser/mysql",
"//pkg/sessionctx/stmtctx",
"//pkg/statistics",
"//pkg/testkit",
"//pkg/testkit/testsetup",
"//pkg/types",
"//pkg/util/chunk",
"//pkg/util/codec",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_stretchr_testify//require",
"@com_github_tiancaiamao_gp//:gp",
"@org_uber_go_goleak//:goleak",
],
)
21 changes: 0 additions & 21 deletions pkg/statistics/handle/handletest/globalstats/BUILD.bazel

This file was deleted.

23 changes: 0 additions & 23 deletions pkg/statistics/handle/handletest/lockstats/BUILD.bazel

This file was deleted.

11 changes: 10 additions & 1 deletion pkg/statistics/handle/lockstats/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,34 @@ go_test(
name = "lockstats_test",
timeout = "short",
srcs = [
"lock_partition_stats_test.go",
"lock_stats_test.go",
"lock_table_stats_test.go",
"main_test.go",
"query_lock_test.go",
"unlock_stats_test.go",
],
embed = [":lockstats"],
flaky = True,
shard_count = 13,
shard_count = 34,
deps = [
"//pkg/config",
"//pkg/domain",
"//pkg/kv",
"//pkg/parser/model",
"//pkg/parser/mysql",
"//pkg/sessionctx",
"//pkg/statistics/handle/util",
"//pkg/testkit",
"//pkg/testkit/testsetup",
"//pkg/types",
"//pkg/util/chunk",
"//pkg/util/mock",
"//pkg/util/sqlexec/mock",
"@com_github_pingcap_errors//:errors",
"@com_github_stretchr_testify//require",
"@com_github_tikv_client_go_v2//util",
"@org_uber_go_goleak//:goleak",
"@org_uber_go_mock//gomock",
],
)

0 comments on commit 69711cd

Please sign in to comment.