30 lines
675 B
Python
30 lines
675 B
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "util",
|
|
srcs = [
|
|
"mock_gpool.go",
|
|
"shard_pool_map.go",
|
|
"util.go",
|
|
],
|
|
importpath = "github.com/pingcap/tidb/pkg/resourcemanager/util",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//pkg/util/intest",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@org_uber_go_atomic//:atomic",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "util_test",
|
|
timeout = "short",
|
|
srcs = ["shard_pool_map_test.go"],
|
|
embed = [":util"],
|
|
flaky = True,
|
|
deps = [
|
|
"//pkg/util/intest",
|
|
"@com_github_stretchr_testify//require",
|
|
],
|
|
)
|