Merge branch 'stable-2.13'

* stable-2.13:
  Forward account indexing events to the other master
  Refactor RestForwarderTest for readability

Change-Id: I5ee0bf41ff996c4b02a4c137a3eedebe2bf91c51
diff --git a/.buckconfig b/.buckconfig
index 5c0ead0..b8cdcdb 100644
--- a/.buckconfig
+++ b/.buckconfig
@@ -6,6 +6,8 @@
 [java]
   jar_spool_mode = direct_to_jar
   src_roots = java, resources
+  source_level = 8
+  target_level = 8
 
 [project]
   ignore = .git, eclipse-out/
diff --git a/BUCK b/BUCK
index 8232c2b..fd220a9 100644
--- a/BUCK
+++ b/BUCK
@@ -9,6 +9,12 @@
   ':high-availability__plugin',
   ':mockito',
   ':wiremock',
+# bazlets include those 3 bouncycastle jars in plugin API so this is temporary
+# until this plugin is built with bazel.
+# see https://gerrit-review.googlesource.com/#/c/102670/ for more info.
+  ':bouncycastle_bcprov',
+  ':bouncycastle_bcpg',
+  ':bouncycastle_bcpkix',
 ]
 
 gerrit_plugin(
@@ -79,3 +85,23 @@
   license = 'DO_NOT_DISTRIBUTE',
   attach_source = False,
 )
+
+BC_VERS = '1.56'
+
+maven_jar(
+  name = 'bouncycastle_bcprov',
+  id = 'org.bouncycastle:bcprov-jdk15on:' + BC_VERS,
+  sha1 = 'a153c6f9744a3e9dd6feab5e210e1c9861362ec7',
+)
+
+maven_jar(
+  name = 'bouncycastle_bcpg',
+  id = 'org.bouncycastle:bcpg-jdk15on:' + BC_VERS,
+  sha1 = '9c3f2e7072c8cc1152079b5c25291a9f462631f1',
+)
+
+maven_jar(
+  name = 'bouncycastle_bcpkix',
+  id = 'org.bouncycastle:bcpkix-jdk15on:' + BC_VERS,
+  sha1 = '4648af70268b6fdb24674fb1fd7c1fcc73db1231',
+)
diff --git a/lib/gerrit/BUCK b/lib/gerrit/BUCK
index b7a40b3..0d9e95d 100644
--- a/lib/gerrit/BUCK
+++ b/lib/gerrit/BUCK
@@ -1,12 +1,12 @@
 include_defs('//bucklets/maven_jar.bucklet')
 
-VER = '2.13.8'
+VER = '2.14'
 REPO = MAVEN_CENTRAL
 
 maven_jar(
   name = 'acceptance-framework',
   id = 'com.google.gerrit:gerrit-acceptance-framework:' + VER,
-  sha1 = 'b35d038d0727889837f0b9710a8a0442471ba8b6',
+  sha1 = 'db1b79a9795e95d133e3f268323ee6c76a723fee',
   license = 'Apache2.0',
   attach_source = False,
   repository = REPO,
@@ -15,7 +15,7 @@
 maven_jar(
   name = 'plugin-api',
   id = 'com.google.gerrit:gerrit-plugin-api:' + VER,
-  sha1 = 'd8137cc9b0cb34429959374ca44d5d2bcf0eff4b',
+ sha1 = '836ef589b45b4adcb381ada3a0f6a9b0ceea5b98',
   license = 'Apache2.0',
   attach_source = False,
   repository = REPO,
diff --git a/src/test/java/com/ericsson/gerrit/plugins/highavailability/cache/CacheEvictionIT.java b/src/test/java/com/ericsson/gerrit/plugins/highavailability/cache/CacheEvictionIT.java
index 7302e8c..cdd70ea 100644
--- a/src/test/java/com/ericsson/gerrit/plugins/highavailability/cache/CacheEvictionIT.java
+++ b/src/test/java/com/ericsson/gerrit/plugins/highavailability/cache/CacheEvictionIT.java
@@ -24,9 +24,10 @@
 
 import com.google.common.base.Throwables;
 import com.google.gerrit.acceptance.GerritConfig;
-import com.google.gerrit.acceptance.GerritConfigs;
+import com.google.gerrit.acceptance.LightweightPluginDaemonTest;
 import com.google.gerrit.acceptance.NoHttpd;
-import com.google.gerrit.acceptance.PluginDaemonTest;
+import com.google.gerrit.acceptance.TestPlugin;
+import com.google.gerrit.acceptance.UseSsh;
 
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.RequestListener;
@@ -42,16 +43,23 @@
 import java.util.concurrent.TimeUnit;
 
 @NoHttpd
-public class CacheEvictionIT extends PluginDaemonTest {
+@UseSsh
+@TestPlugin(
+    name = "high-availability",
+    sysModule = "com.ericsson.gerrit.plugins.highavailability.Module",
+    httpModule = "com.ericsson.gerrit.plugins.highavailability.HttpModule"
+)
+public class CacheEvictionIT extends LightweightPluginDaemonTest {
+  private static final int PORT = 18888;
+  private static final String URL = "http://localhost:" + PORT;
 
   @Rule
-  public WireMockRule wireMockRule = new WireMockRule(options().port(18888), false);
+  public WireMockRule wireMockRule = new WireMockRule(options().port(PORT), false);
 
   @Test
-  @GerritConfigs({
-      @GerritConfig(name = "plugin.high-availability.url", value = "http://localhost:18888"),
-      @GerritConfig(name = "plugin.high-availability.user", value = "admin"),
-      @GerritConfig(name = "plugin.high-availability.cacheThreadPoolSize", value = "10")})
+  @GerritConfig(name = "plugin.high-availability.url", value = URL)
+  @GerritConfig(name = "plugin.high-availability`.user", value = "admin")
+  @GerritConfig(name = "plugin.high-availability.cacheThreadPoolSize", value = "10")
   public void flushAndSendPost() throws Exception {
     final String flushRequest =
         "/plugins/high-availability/cache/" + Constants.PROJECT_LIST;