Skip to content

Commit

Permalink
*: set fine grain timeout and update bazel config (pingcap#36220)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei authored Jul 15, 2022
1 parent 987bdd3 commit fa00fc5
Show file tree
Hide file tree
Showing 88 changed files with 119 additions and 1 deletion.
6 changes: 6 additions & 0 deletions br/pkg/lightning/restore/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ go_library(
"check_info.go",
"check_template.go",
"checksum.go",
"get_pre_info.go",
"meta_manager.go",
"restore.go",
"table_restore.go",
Expand Down Expand Up @@ -38,20 +39,23 @@ go_library(
"//br/pkg/utils",
"//br/pkg/version",
"//br/pkg/version/build",
"//ddl",
"//kv",
"//meta/autoid",
"//parser",
"//parser/ast",
"//parser/format",
"//parser/model",
"//parser/mysql",
"//planner/core",
"//store/driver",
"//store/pdtypes",
"//table",
"//table/tables",
"//types",
"//util/collate",
"//util/mathutil",
"//util/mock",
"@com_github_coreos_go_semver//semver",
"@com_github_docker_go_units//:go-units",
"@com_github_google_uuid//:uuid",
Expand Down Expand Up @@ -79,6 +83,7 @@ go_test(
"check_info_test.go",
"checksum_test.go",
"chunk_restore_test.go",
"get_pre_info_test.go",
"meta_manager_test.go",
"restore_schema_test.go",
"restore_test.go",
Expand All @@ -99,6 +104,7 @@ go_test(
"//br/pkg/lightning/log",
"//br/pkg/lightning/metric",
"//br/pkg/lightning/mydump",
"//br/pkg/lightning/restore/mock",
"//br/pkg/lightning/verification",
"//br/pkg/lightning/web",
"//br/pkg/lightning/worker",
Expand Down
27 changes: 27 additions & 0 deletions br/pkg/lightning/restore/mock/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "mock",
srcs = ["mock.go"],
importpath = "github.com/pingcap/tidb/br/pkg/lightning/restore/mock",
visibility = ["//visibility:public"],
deps = [
"//br/pkg/lightning/mydump",
"//br/pkg/storage",
"//parser/model",
"//store/pdtypes",
"//util/filter",
"@com_github_pingcap_errors//:errors",
],
)

go_test(
name = "mock_test",
srcs = ["mock_test.go"],
embed = [":mock"],
deps = [
"//br/pkg/lightning/restore",
"//parser/model",
"@com_github_stretchr_testify//require",
],
)
1 change: 1 addition & 0 deletions executor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ go_test(
"//util/mathutil",
"//util/memory",
"//util/mock",
"//util/paging",
"//util/pdapi",
"//util/plancodec",
"//util/ranger",
Expand Down
2 changes: 1 addition & 1 deletion sessionctx/sessionstates/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ go_test(
"session_states_test.go",
"session_token_test.go",
],
race = "on",
embed = [":sessionstates"],
race = "on",
deps = [
"//config",
"//errno",
Expand Down
1 change: 1 addition & 0 deletions sessionctx/variable/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ go_library(
"//util/execdetails",
"//util/logutil",
"//util/mathutil",
"//util/paging",
"//util/rowcodec",
"//util/stmtsummary",
"//util/stringutil",
Expand Down
1 change: 1 addition & 0 deletions sessiontxn/isolation/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ go_library(

go_test(
name = "isolation_test",
timeout = "short",
srcs = [
"main_test.go",
"optimistic_test.go",
Expand Down
1 change: 1 addition & 0 deletions store/copr/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ go_library(
"//store/driver/backoff",
"//store/driver/error",
"//store/driver/options",
"//util",
"//util/execdetails",
"//util/logutil",
"//util/mathutil",
Expand Down
1 change: 1 addition & 0 deletions table/temptable/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ go_library(

go_test(
name = "temptable_test",
timeout = "short",
srcs = [
"ddl_test.go",
"interceptor_test.go",
Expand Down
1 change: 1 addition & 0 deletions tablecodec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ go_library(

go_test(
name = "tablecodec_test",
timeout = "short",
srcs = [
"bench_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions tablecodec/rowindexcodec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(

go_test(
name = "rowindexcodec_test",
timeout = "short",
srcs = [
"main_test.go",
"rowindexcodec_test.go",
Expand Down
1 change: 1 addition & 0 deletions telemetry/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ go_library(

go_test(
name = "telemetry_test",
timeout = "short",
srcs = [
"data_cluster_hardware_test.go",
"data_feature_usage_test.go",
Expand Down
1 change: 1 addition & 0 deletions telemetry/cte_test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "cte_test_test",
timeout = "short",
srcs = ["cte_test.go"],
deps = [
"//config",
Expand Down
1 change: 1 addition & 0 deletions testkit/testfork/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ go_library(

go_test(
name = "testfork_test",
timeout = "short",
srcs = ["fork_test.go"],
embed = [":testfork"],
deps = ["@com_github_stretchr_testify//require"],
Expand Down
1 change: 1 addition & 0 deletions testkit/testutil/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ go_library(

go_test(
name = "testutil_test",
timeout = "short",
srcs = ["require_test.go"],
embed = [":testutil"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions tests/realtikvtest/brietest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "brietest_test",
timeout = "short",
srcs = [
"backup_restore_test.go",
"binlog_test.go",
Expand Down
1 change: 1 addition & 0 deletions tests/realtikvtest/pessimistictest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "pessimistictest_test",
timeout = "short",
srcs = [
"main_test.go",
"pessimistic_test.go",
Expand Down
1 change: 1 addition & 0 deletions tests/realtikvtest/statisticstest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "statisticstest_test",
timeout = "short",
srcs = [
"main_test.go",
"statistics_test.go",
Expand Down
1 change: 1 addition & 0 deletions tests/realtikvtest/txntest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "txntest_test",
timeout = "short",
srcs = [
"isolation_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions tidb-binlog/driver/reader/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ go_library(

go_test(
name = "reader_test",
timeout = "short",
srcs = ["offset_test.go"],
embed = [":reader"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions tidb-binlog/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ go_library(

go_test(
name = "node_test",
timeout = "short",
srcs = ["registry_test.go"],
embed = [":node"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions tidb-binlog/pump_client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ go_library(

go_test(
name = "pump_client_test",
timeout = "short",
srcs = [
"bench_test.go",
"client_test.go",
Expand Down
1 change: 1 addition & 0 deletions tidb-server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ go_binary(

go_test(
name = "tidb-server_test",
timeout = "short",
srcs = ["main_test.go"],
embed = [":tidb-server_lib"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions types/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ go_library(

go_test(
name = "types_test",
timeout = "short",
srcs = [
"benchmark_test.go",
"binary_literal_test.go",
Expand Down
1 change: 1 addition & 0 deletions types/json/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ go_library(

go_test(
name = "json_test",
timeout = "short",
srcs = [
"binary_functions_test.go",
"binary_test.go",
Expand Down
1 change: 1 addition & 0 deletions types/parser_driver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ go_library(

go_test(
name = "parser_driver_test",
timeout = "short",
srcs = [
"main_test.go",
"value_expr_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ go_library(

go_test(
name = "util_test",
timeout = "short",
srcs = [
"errors_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/benchdaily/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(

go_test(
name = "benchdaily_test",
timeout = "short",
srcs = [
"bench_daily_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/bitmap/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(

go_test(
name = "bitmap_test",
timeout = "short",
srcs = [
"concurrent_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/checksum/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(

go_test(
name = "checksum_test",
timeout = "short",
srcs = [
"checksum_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/chunk/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ go_library(

go_test(
name = "chunk_test",
timeout = "short",
srcs = [
"alloc_test.go",
"chunk_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/codec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ go_library(

go_test(
name = "codec_test",
timeout = "short",
srcs = [
"bench_test.go",
"bytes_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/column-mapping/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ go_library(

go_test(
name = "column-mapping_test",
timeout = "short",
srcs = ["column_test.go"],
embed = [":column-mapping"],
deps = ["@com_github_stretchr_testify//require"],
Expand Down
1 change: 1 addition & 0 deletions util/cpuprofile/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ go_library(

go_test(
name = "cpuprofile_test",
timeout = "short",
srcs = ["cpuprofile_test.go"],
embed = [":cpuprofile"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions util/cteutil/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ go_library(

go_test(
name = "cteutil_test",
timeout = "short",
srcs = [
"main_test.go",
"storage_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/dbterror/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ go_library(

go_test(
name = "dbterror_test",
timeout = "short",
srcs = [
"main_test.go",
"terror_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/dbutil/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ go_library(

go_test(
name = "dbutil_test",
timeout = "short",
srcs = [
"common_test.go",
"index_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/disjointset/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(

go_test(
name = "disjointset_test",
timeout = "short",
srcs = [
"int_set_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/encrypt/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ go_library(

go_test(
name = "encrypt_test",
timeout = "short",
srcs = [
"aes_layer_test.go",
"aes_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/etcd/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ go_library(

go_test(
name = "etcd_test",
timeout = "short",
srcs = ["etcd_test.go"],
embed = [":etcd"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions util/execdetails/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ go_library(

go_test(
name = "execdetails_test",
timeout = "short",
srcs = [
"execdetails_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/expensivequery/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ go_library(

go_test(
name = "expensivequery_test",
timeout = "short",
srcs = ["expensivequerey_test.go"],
embed = [":expensivequery"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions util/fastrand/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(

go_test(
name = "fastrand_test",
timeout = "short",
srcs = [
"main_test.go",
"random_test.go",
Expand Down
Loading

0 comments on commit fa00fc5

Please sign in to comment.