E2E integration test using Kafka docker container

The idea for the test is very simple:

* Set up junit test based on LightweightPluginDaemonTest
* Interfere the plugin boot process and start kafka docker container
  using testcontainers library integration
* Boot the plugin with mostly default configuration, but overwrite the
  kafka host and port that was exposed by kafka docker instance
* Inject drop event listener dynamic set in the test instance and
  add dummy listener instance to interfer with dropped events
* Perform some actions and analyze the dropped events: it must be
  exactly all events we expect to publish and receive for the operation
  executed during the test method

Furture work: we should exercise all operations, so that all supported
events: index, cache eviction, stream events and project list update
events are fired and consumed.

It should be noted, that there is currently a difference if ReviewDb or
NoteDb backend is used during the test execution: the different kind of
events are fired.

When NoteDb mode is used more ref updated events are triggered.

Test Plan:

1. Run tests in ReviewDb mode:
  $ bazel test plugins/multi-site:multi_site_tests

2. Run tests in NoteDb mode:
  $ bazel test --test_env=GERRIT_NOTEDB=READ_WRITE \
      plugins/multi-site:multi_site_tests

Requires Gerrit change https://gerrit-review.googlesource.com/c/gerrit/+/215452

Change-Id: I8946104d8ff3c1a7c40dc811543a94f3132c3bc3
5 files changed