Split integration tests to different targets Running all integration tests as part of one single 'replication_it' target does not cope well with the addition of extra tests, because it is bound to take longer and longer, eventually hitting any test timeout threshold. Splitting integration tests into different targets avoids timeout failures and also provides additional benefits, such as: - Better understanding of test failures - More efficient utilization of bazel build outputs and remote caching, effectively making tests execution faster. Bug: Issue 13909 Change-Id: Ifc6cce9996d3a8a23ec2a66c377978205fb6680f
diff --git a/BUILD b/BUILD index 72a3fc8..1bf917d 100644 --- a/BUILD +++ b/BUILD
@@ -32,18 +32,16 @@ ], ) -junit_tests( - name = "replication_it", - srcs = glob([ - "src/test/java/**/*IT.java", - ]), +[junit_tests( + name = f[:f.index(".")].replace("/", "_"), + srcs = [f], tags = ["replication"], visibility = ["//visibility:public"], deps = PLUGIN_TEST_DEPS + PLUGIN_DEPS + [ ":replication__plugin", ":replication_util", ], -) +) for f in glob(["src/test/java/**/*IT.java"])] java_library( name = "replication_util",