load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "tikv", srcs = [ "deadlock.go", "detector.go", "inner_server.go", "mock_region.go", "mvcc.go", "region.go", "server.go", "server_batch.go", "util.go", "write.go", ], importpath = "github.com/pingcap/tidb/store/mockstore/unistore/tikv", visibility = ["//visibility:public"], deps = [ "//kv", "//sessionctx/stmtctx", "//store/mockstore/unistore/client", "//store/mockstore/unistore/config", "//store/mockstore/unistore/cophandler", "//store/mockstore/unistore/lockstore", "//store/mockstore/unistore/metrics", "//store/mockstore/unistore/pd", "//store/mockstore/unistore/tikv/dbreader", "//store/mockstore/unistore/tikv/kverrors", "//store/mockstore/unistore/tikv/mvcc", "//store/mockstore/unistore/tikv/pberror", "//store/mockstore/unistore/util/lockwaiter", "//tablecodec", "//types", "//util/codec", "//util/mathutil", "//util/rowcodec", "@com_github_dgryski_go_farm//:go-farm", "@com_github_gogo_protobuf//proto", "@com_github_google_btree//:btree", "@com_github_pingcap_badger//:badger", "@com_github_pingcap_badger//y", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_kvproto//pkg/coprocessor", "@com_github_pingcap_kvproto//pkg/deadlock", "@com_github_pingcap_kvproto//pkg/errorpb", "@com_github_pingcap_kvproto//pkg/kvrpcpb", "@com_github_pingcap_kvproto//pkg/metapb", "@com_github_pingcap_kvproto//pkg/mpp", "@com_github_pingcap_kvproto//pkg/pdpb", "@com_github_pingcap_kvproto//pkg/tikvpb", "@com_github_pingcap_log//:log", "@com_github_pingcap_tipb//go-tipb", "@com_github_tikv_client_go_v2//oracle", "@com_github_tikv_pd_client//:client", "@org_golang_google_grpc//:grpc", "@org_golang_x_exp//slices", "@org_uber_go_zap//:zap", ], ) go_test( name = "tikv_test", timeout = "short", srcs = [ "detector_test.go", "main_test.go", "mvcc_test.go", ], embed = [":tikv"], flaky = True, deps = [ "//store/mockstore/unistore/config", "//store/mockstore/unistore/lockstore", "//store/mockstore/unistore/tikv/kverrors", "//store/mockstore/unistore/tikv/mvcc", "//store/mockstore/unistore/util/lockwaiter", "//testkit/testsetup", "@com_github_pingcap_badger//:badger", "@com_github_pingcap_badger//y", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_kvproto//pkg/deadlock", "@com_github_pingcap_kvproto//pkg/kvrpcpb", "@com_github_pingcap_kvproto//pkg/metapb", "@com_github_stretchr_testify//require", "@org_uber_go_goleak//:goleak", ], )