summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Barone <syntonyze@gmail.com>2021-01-07 12:07:09 +0100
committerAntonio Barone <syntonyze@gmail.com>2021-01-07 14:34:31 +0100
commit22ca0b406a4efb9aebbbfcac8d2d986812423f01 (patch)
tree57661953fcf5a5925086ad4f7d4967b72d4885c3
parent0995fe0445f507279c05cb5ee60a9413671be400 (diff)
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
-rw-r--r--BUILD10
1 files changed, 4 insertions, 6 deletions
diff --git a/BUILD b/BUILD
index 72a3fc8..1bf917d 100644
--- a/BUILD
+++ b/BUILD
@@ -32,18 +32,16 @@ junit_tests(
],
)
-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",