Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#56362
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
fishiu authored and ti-chi-bot committed Nov 5, 2024
1 parent edd536a commit 37834d6
Show file tree
Hide file tree
Showing 3 changed files with 1,178 additions and 0 deletions.
63 changes: 63 additions & 0 deletions pkg/owner/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "owner",
srcs = [
"manager.go",
"mock.go",
],
importpath = "github.com/pingcap/tidb/pkg/owner",
visibility = ["//visibility:public"],
deps = [
"//pkg/ddl/util",
"//pkg/kv",
"//pkg/metrics",
"//pkg/parser/terror",
"//pkg/util",
"//pkg/util/logutil",
"//pkg/util/timeutil",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@io_etcd_go_etcd_api_v3//mvccpb",
"@io_etcd_go_etcd_api_v3//v3rpc/rpctypes",
"@io_etcd_go_etcd_client_v3//:client",
"@io_etcd_go_etcd_client_v3//concurrency",
"@org_uber_go_atomic//:atomic",
"@org_uber_go_zap//:zap",
],
)

go_test(
name = "owner_test",
timeout = "short",
srcs = [
"fail_test.go",
"main_test.go",
"manager_test.go",
],
embed = [":owner"],
flaky = True,
shard_count = 9,
deps = [
"//pkg/ddl",
"//pkg/infoschema",
"//pkg/kv",
"//pkg/parser/terror",
"//pkg/store/mockstore",
"//pkg/testkit",
"//pkg/testkit/testsetup",
"//pkg/util",
"//pkg/util/logutil",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@io_etcd_go_etcd_client_v3//:client",
"@io_etcd_go_etcd_client_v3//concurrency",
"@io_etcd_go_etcd_server_v3//embed",
"@io_etcd_go_etcd_tests_v3//integration",
"@org_golang_google_grpc//:grpc",
"@org_golang_x_exp//rand",
"@org_uber_go_goleak//:goleak",
],
)
Loading

0 comments on commit 37834d6

Please sign in to comment.