Elasticsearch: cover V5 and flaky V6 tests -for CI
Add execution of the V5 and V6 tests to the already included V2 default. Include flaky tag support for the V6 tests though, as their accounts and groups subset currently fails (cf. Issue 9252). Adding such a tag here allows to exclude the V6 tests in a CI context. The V5 tests still pass (just like V2's) thus require no such flaky tag for passing CI coverage. Before this change, it was not possible to benefit from V5/V6 elastic tests feedback. Thus the previous risk of elastic support regressions. Once a fix for Issue 9252 becomes available, one will be able to get such feedback for V6, on top of V5 added herein and default V2. Until then, excluding the hereby flaky V6 tests allows for V5 and V2 checks: bazel test //... --test_tag_filters=elastic,-flaky (e.g.). Change-Id: I62fef6dca20a73065df6b3dd4b21deb1ac7653fd
This commit is contained in:
@@ -27,32 +27,61 @@ java_library(
|
||||
],
|
||||
)
|
||||
|
||||
ELASTICSEARCH_TESTS = {i: "ElasticQuery" + i.capitalize() + "sTest.java" for i in [
|
||||
ELASTICSEARCH_DEPS = [
|
||||
":elasticsearch_test_utils",
|
||||
"//java/com/google/gerrit/elasticsearch",
|
||||
"//java/com/google/gerrit/server",
|
||||
"//java/com/google/gerrit/server/project/testing:project-test-util",
|
||||
"//java/com/google/gerrit/testing:gerrit-test-util",
|
||||
"//lib/guice",
|
||||
"//lib/httpcomponents:httpcore",
|
||||
"//lib/jgit/org.eclipse.jgit:jgit",
|
||||
"//lib/jgit/org.eclipse.jgit.junit:junit",
|
||||
"//lib/testcontainers",
|
||||
]
|
||||
|
||||
QUERY_TESTS_DEP = "//javatests/com/google/gerrit/server/query/%s:abstract_query_tests"
|
||||
|
||||
TYPES = [
|
||||
"account",
|
||||
"change",
|
||||
"group",
|
||||
"project",
|
||||
]}
|
||||
]
|
||||
|
||||
SUFFIX = "sTest.java"
|
||||
|
||||
ELASTICSEARCH_TESTS = {i: "ElasticQuery" + i.capitalize() + SUFFIX for i in TYPES}
|
||||
|
||||
ELASTICSEARCH_TESTS_V5 = {i: "ElasticV5Query" + i.capitalize() + SUFFIX for i in TYPES}
|
||||
|
||||
ELASTICSEARCH_TESTS_V6 = {i: "ElasticV6Query" + i.capitalize() + SUFFIX for i in TYPES}
|
||||
|
||||
ELASTICSEARCH_TAGS = [
|
||||
"docker",
|
||||
"elastic",
|
||||
]
|
||||
|
||||
[junit_tests(
|
||||
name = "elasticsearch_%ss_test" % name,
|
||||
size = "large",
|
||||
srcs = [src],
|
||||
tags = [
|
||||
"docker",
|
||||
"elastic",
|
||||
],
|
||||
deps = [
|
||||
":elasticsearch_test_utils",
|
||||
"//java/com/google/gerrit/elasticsearch",
|
||||
"//java/com/google/gerrit/server",
|
||||
"//java/com/google/gerrit/server/project/testing:project-test-util",
|
||||
"//java/com/google/gerrit/testing:gerrit-test-util",
|
||||
"//javatests/com/google/gerrit/server/query/%s:abstract_query_tests" % name,
|
||||
"//lib/guice",
|
||||
"//lib/httpcomponents:httpcore",
|
||||
"//lib/jgit/org.eclipse.jgit:jgit",
|
||||
"//lib/jgit/org.eclipse.jgit.junit:junit",
|
||||
"//lib/testcontainers",
|
||||
],
|
||||
tags = ELASTICSEARCH_TAGS,
|
||||
deps = ELASTICSEARCH_DEPS + [QUERY_TESTS_DEP % name],
|
||||
) for name, src in ELASTICSEARCH_TESTS.items()]
|
||||
|
||||
[junit_tests(
|
||||
name = "elasticsearch_%ss_test_V5" % name,
|
||||
size = "large",
|
||||
srcs = [src],
|
||||
tags = ELASTICSEARCH_TAGS,
|
||||
deps = ELASTICSEARCH_DEPS + [QUERY_TESTS_DEP % name],
|
||||
) for name, src in ELASTICSEARCH_TESTS_V5.items()]
|
||||
|
||||
[junit_tests(
|
||||
name = "elasticsearch_%ss_test_V6" % name,
|
||||
size = "large",
|
||||
srcs = [src],
|
||||
tags = ELASTICSEARCH_TAGS + ["flaky"],
|
||||
deps = ELASTICSEARCH_DEPS + [QUERY_TESTS_DEP % name],
|
||||
) for name, src in ELASTICSEARCH_TESTS_V6.items()]
|
||||
|
||||
Reference in New Issue
Block a user