Split integrations tests into separate Bazel targets.
Currently all the tests are under the same Bazel target
`pull_replication_tests`.
With this new approach, all the `IT tests` will have its
own Bazel target, therefore the distributed build (RBE
backend) will improve the performance and the isolation
of failing tests will be easier.
Bug: Issue 16931
Change-Id: I22b43c968ec24de655bd8adbd45cdef8a440fa31
diff --git a/BUILD b/BUILD
index 5a7d344..7646282 100644
--- a/BUILD
+++ b/BUILD
@@ -23,10 +23,8 @@
junit_tests(
name = "pull_replication_tests",
- size = "large",
srcs = glob([
"src/test/java/**/*Test.java",
- "src/test/java/**/*IT.java",
]),
tags = ["pull-replication"],
visibility = ["//visibility:public"],
@@ -38,6 +36,18 @@
],
)
+[junit_tests(
+ name = f[:f.index(".")].replace("/", "_"),
+ srcs = [f],
+ tags = ["pull-replication"],
+ visibility = ["//visibility:public"],
+ deps = PLUGIN_TEST_DEPS + PLUGIN_DEPS + [
+ ":pull-replication__plugin",
+ ":pull_replication_util",
+ "//plugins/replication",
+ ],
+) for f in glob(["src/test/java/**/*IT.java"])]
+
java_library(
name = "pull_replication_util",
testonly = True,