diff options
author | Dave Borowitz <dborowitz@google.com> | 2017-11-02 10:47:35 -0400 |
---|---|---|
committer | David Pursehouse <dpursehouse@collab.net> | 2018-07-11 15:27:27 +0900 |
commit | 5658c9586907bec0bb5fe4106934fa02e25bceaf (patch) | |
tree | d8c5dda0ffdf25e92cd83c0a245d7d84d8997249 | |
parent | 80618995b777437530854aa3f16eb60c88f5ff7e (diff) |
Split Elasticsearch query tests into separate rules
$ bazel test -t- //gerrit-elasticsearch/...
INFO: Build options have changed, discarding analysis cache.
INFO: Analysed 3 targets (2 packages loaded).
INFO: Found 3 test targets...
INFO: Elapsed time: 126.687s, Critical Path: 124.80s
INFO: 9 processes: 2 remote cache hit, 4 darwin-sandbox, 3 worker.
INFO: Build completed successfully, 24 total actions
//gerrit-elasticsearch:elasticsearch_query_accounts_test PASSED in 65.0s
//gerrit-elasticsearch:elasticsearch_query_changes_test PASSED in 122.5s
//gerrit-elasticsearch:elasticsearch_query_groups_test PASSED in 53.5s
Executed 3 out of 3 tests: 3 tests pass.
INFO: Build completed successfully, 24 total actions
Change-Id: I1bc530879ae69d74d39750a173d5458b2fb72bd9
-rw-r--r-- | gerrit-elasticsearch/BUILD | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gerrit-elasticsearch/BUILD b/gerrit-elasticsearch/BUILD index 2d1f30e9a1..e39c3ac698 100644 --- a/gerrit-elasticsearch/BUILD +++ b/gerrit-elasticsearch/BUILD @@ -45,10 +45,16 @@ java_library( ], ) -junit_tests( - name = "elasticsearch_tests", +ELASTICSEARCH_TESTS = {i: "src/test/java/com/google/gerrit/elasticsearch/ElasticQuery" + i.capitalize() + "sTest.java" for i in [ + "account", + "change", + "group", +]} + +[junit_tests( + name = "elasticsearch_query_%ss_test" % name, size = "large", - srcs = glob(["src/test/java/**/*Test.java"]), + srcs = [src], tags = [ "docker", "elastic", @@ -62,4 +68,4 @@ junit_tests( "//lib/guice", "//lib/jgit/org.eclipse.jgit:jgit", ], -) +) for name, src in ELASTICSEARCH_TESTS.items()] |