Merge branch 'stable-2.16'
* stable-2.16:
Upgrade elasticsearch-rest-client to 6.5.1
Change-Id: I505af89e8c12efdb4c739a84c4aad645c805d213
diff --git a/javatests/com/google/gerrit/elasticsearch/BUILD b/javatests/com/google/gerrit/elasticsearch/BUILD
index cc849eb..51d45f2 100644
--- a/javatests/com/google/gerrit/elasticsearch/BUILD
+++ b/javatests/com/google/gerrit/elasticsearch/BUILD
@@ -86,6 +86,7 @@
tags = ["elastic"],
deps = [
"//java/com/google/gerrit/elasticsearch",
+ "//java/com/google/gerrit/testing:gerrit-test-util",
"//lib:guava",
"//lib/guice",
"//lib/jgit/org.eclipse.jgit:jgit",
diff --git a/javatests/com/google/gerrit/elasticsearch/ElasticConfigurationTest.java b/javatests/com/google/gerrit/elasticsearch/ElasticConfigurationTest.java
index 559b8c7..735354e 100644
--- a/javatests/com/google/gerrit/elasticsearch/ElasticConfigurationTest.java
+++ b/javatests/com/google/gerrit/elasticsearch/ElasticConfigurationTest.java
@@ -27,17 +27,14 @@
import static java.util.stream.Collectors.toList;
import com.google.common.collect.ImmutableList;
+import com.google.gerrit.testing.GerritBaseTests;
import com.google.inject.ProvisionException;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import org.eclipse.jgit.lib.Config;
-import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
-public class ElasticConfigurationTest {
- @Rule public ExpectedException exception = ExpectedException.none();
-
+public class ElasticConfigurationTest extends GerritBaseTests {
@Test
public void singleServerNoOtherConfig() throws Exception {
Config cfg = newConfig();
diff --git a/javatests/com/google/gerrit/elasticsearch/ElasticVersionTest.java b/javatests/com/google/gerrit/elasticsearch/ElasticVersionTest.java
index b598a0a..3ab9d5a 100644
--- a/javatests/com/google/gerrit/elasticsearch/ElasticVersionTest.java
+++ b/javatests/com/google/gerrit/elasticsearch/ElasticVersionTest.java
@@ -16,13 +16,10 @@
import static com.google.common.truth.Truth.assertThat;
-import org.junit.Rule;
+import com.google.gerrit.testing.GerritBaseTests;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
-public class ElasticVersionTest {
- @Rule public ExpectedException exception = ExpectedException.none();
-
+public class ElasticVersionTest extends GerritBaseTests {
@Test
public void supportedVersion() throws Exception {
assertThat(ElasticVersion.forVersion("2.4.0")).isEqualTo(ElasticVersion.V2_4);