Merge branch 'stable-2.16'

* stable-2.16:
  Bump kafka-clients version to 2.1.0
  Bump testcontainers kafka version to 1.10.6
  EventConsumerIT: Support ReviewDb and NoteDb backends

Change-Id: I7d2dbd95a18bc93a4c542075c1a9f1b5c7f3e87e
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl
index 6a51cf5..bebcc4e 100644
--- a/external_plugin_deps.bzl
+++ b/external_plugin_deps.bzl
@@ -3,12 +3,12 @@
 def external_plugin_deps():
     maven_jar(
         name = "kafka_client",
-        artifact = "org.apache.kafka:kafka-clients:0.10.0.1",
-        sha1 = "36ebf4044d0e546bf74c95629d736ca63320a323",
+        artifact = "org.apache.kafka:kafka-clients:2.1.0",
+        sha1 = "34d9983705c953b97abb01e1cd04647f47272fe5",
     )
 
     maven_jar(
         name = "testcontainers-kafka",
-        artifact = "org.testcontainers:kafka:1.8.0",
-        sha1 = "1d6f0a529dd87bc66bc68a09b8b58ed17ebf33f6",
+        artifact = "org.testcontainers:kafka:1.10.6",
+        sha1 = "5984e31306bd6c84a36092cdd19e0ef7e2268d98",
     )
diff --git a/src/test/java/com/googlesource/gerrit/plugins/kafka/EventConsumerIT.java b/src/test/java/com/googlesource/gerrit/plugins/kafka/EventConsumerIT.java
index 9007e91..12a448c 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/kafka/EventConsumerIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/kafka/EventConsumerIT.java
@@ -17,6 +17,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.base.Supplier;
+import com.google.common.collect.Iterables;
 import com.google.gerrit.acceptance.GerritConfig;
 import com.google.gerrit.acceptance.LightweightPluginDaemonTest;
 import com.google.gerrit.acceptance.NoHttpd;
@@ -103,16 +104,16 @@
       }
     }
 
-    // The received 6 events in order:
-    //
+    // There are 6 events are received in the following order:
     // 1. refUpdate:        ref: refs/sequences/changes
     // 2. refUpdate:        ref: refs/changes/01/1/1
     // 3. refUpdate:        ref: refs/changes/01/1/meta
     // 4. patchset-created: ref: refs/changes/01/1/1
-    // 5. refUpdate:        ref: refs/changes/01/1/meta"
+    // 5. refUpdate:        ref: refs/changes/01/1/meta
     // 6. comment-added:    ref: refs/heads/master
+
     assertThat(events).hasSize(6);
-    String commentAddedEventJson = events.get(5);
+    String commentAddedEventJson = Iterables.getLast(events);
 
     Gson gson =
         new GsonBuilder()