Files
gerrit/gerrit-elasticsearch/BUILD
David Pursehouse 24e7484fd4 Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  AbstractElasticIndex: Don't mention "change" in exception message
  Consistently import org.slf4j.LoggerFactory
  PluginLoader: Make Logger private
  Documentation: clarify latest IntelliJ version use
  Elasticsearch builders: fix the Eclipse warnings
  Remove stale references to no longer used jackson libraries
  Add 'docker' tag to build rules for Elasticsearch tests
  ReindexIT: Split Elasticsearch test out to a separate class

Due to change I7c1461c45 ("ReindexIT: Split Elasticsearch test out to
a separate class") it is now possible to re-introduce the other changes
that were reverted in previous merges from stable-2.14 to stable-2.15:

- Iccf443102 ("Acceptance tests: Replace embedded ES with docker
  testcontainer")

- I57e5d0718 ("Acceptance tests: Remove ES bootstrap boilerplate")

Although the reindex tests for Elasticsearch still don't work on the
stable-2.15 branch (issue 8799), they are now isolated in their own
class and the tests can be skipped using the @Ignore annotation.

Change-Id: Ia19ea3fc68d80e0d20ff3cbed2baa49981db401e
2018-05-29 15:27:05 +09:00

73 lines
2.0 KiB
Python

java_library(
name = "elasticsearch",
srcs = glob(["src/main/java/**/*.java"]),
visibility = ["//visibility:public"],
deps = [
"//gerrit-extension-api:api",
"//gerrit-index:index",
"//gerrit-index:query_exception",
"//gerrit-reviewdb:server",
"//gerrit-server:server",
"//lib:gson",
"//lib:guava",
"//lib:gwtorm",
"//lib/commons:codec",
"//lib/elasticsearch-rest-client",
"//lib/guice",
"//lib/guice:guice-assistedinject",
"//lib/httpcomponents:httpasyncclient",
"//lib/httpcomponents:httpclient",
"//lib/httpcomponents:httpcore",
"//lib/httpcomponents:httpcore-nio",
"//lib/jackson:jackson-core",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/log:api",
],
)
load("//tools/bzl:junit.bzl", "junit_tests")
java_library(
name = "elasticsearch_test_utils",
testonly = 1,
srcs = glob([
"src/test/java/**/ElasticTestUtils.java",
"src/test/java/**/ElasticContainer.java",
]),
visibility = ["//visibility:public"],
deps = [
":elasticsearch",
"//gerrit-index:index",
"//gerrit-reviewdb:server",
"//gerrit-server:server",
"//lib:gson",
"//lib:truth",
"//lib/guice",
"//lib/httpcomponents:httpcore",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/testcontainers",
],
)
junit_tests(
name = "elasticsearch_tests",
size = "large",
srcs = glob(["src/test/java/**/*Test.java"]),
tags = [
"docker",
"elastic",
],
deps = [
":elasticsearch",
":elasticsearch_test_utils",
"//gerrit-server:query_tests_code",
"//gerrit-server:server",
"//gerrit-server:testutil",
"//lib/guice",
"//lib/httpcomponents:httpcore",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/jgit/org.eclipse.jgit.junit:junit",
"//lib/testcontainers",
],
)