54 lines
1.3 KiB
Python
54 lines
1.3 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "runtime",
|
|
srcs = [
|
|
"cache.go",
|
|
"runtime.go",
|
|
"worker.go",
|
|
],
|
|
importpath = "github.com/pingcap/tidb/timer/runtime",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//timer/api",
|
|
"//timer/metrics",
|
|
"//util",
|
|
"//util/logutil",
|
|
"//util/timeutil",
|
|
"@com_github_google_uuid//:uuid",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@com_github_prometheus_client_golang//prometheus",
|
|
"@org_golang_x_exp//maps",
|
|
"@org_uber_go_zap//:zap",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "runtime_test",
|
|
timeout = "short",
|
|
srcs = [
|
|
"cache_test.go",
|
|
"main_test.go",
|
|
"runtime_test.go",
|
|
"worker_test.go",
|
|
],
|
|
embed = [":runtime"],
|
|
flaky = True,
|
|
race = "on",
|
|
shard_count = 23,
|
|
deps = [
|
|
"//testkit/testsetup",
|
|
"//timer/api",
|
|
"//util",
|
|
"//util/mock",
|
|
"//util/timeutil",
|
|
"@com_github_google_uuid//:uuid",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@com_github_robfig_cron_v3//:cron",
|
|
"@com_github_stretchr_testify//mock",
|
|
"@com_github_stretchr_testify//require",
|
|
"@org_uber_go_atomic//:atomic",
|
|
"@org_uber_go_goleak//:goleak",
|
|
],
|
|
)
|