Merge branch 'stable-2.16'
* stable-2.16:
SshCommandsIT: Add coverage of the "kill" and "ps" commands
KillCommand: argument value should not be final
Update git submodules
AbstractQueryChangesTest: Test visibleto predicate with a group
Fix invalid json example in POST access endpoint (remove array)
ElasticV7QueryChangesTest: Close indices after test
Upgrade Testcontainers to 1.10.2 and use ElasticsearchContainer
Change-Id: I1370945fa85fc2fdcbaa58b5109fd30c0d72115c
diff --git a/javatests/com/google/gerrit/elasticsearch/BUILD b/javatests/com/google/gerrit/elasticsearch/BUILD
index 446953e..61bd263 100644
--- a/javatests/com/google/gerrit/elasticsearch/BUILD
+++ b/javatests/com/google/gerrit/elasticsearch/BUILD
@@ -90,6 +90,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 2456535..baf6c2b 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("5.6.0")).isEqualTo(ElasticVersion.V5_6);