Update git submodules
* Update plugins/replication from branch 'stable-2.16'
to 896e67184e9b98262775ab1c71a0b76ac5baff21
- ReplicationIT: Don't swallow exceptions on failed repository operations
The methods getRepo and getRef catch exceptions and return null, which
will then cause NullPointerException on subsequent dereference, making
it less easy to track down the actual cause.
Remove the getRepo method and always open the repo in a try-with-resource
that will throw the exception and fail the test if the repository could
not be opened.
Some calls to getRef are done in a consumer which means the method can't
throw an exception. In these cases, it's OK for the method to return
null because then the test will fail anyway due to InterruptedException
being raised when the non-null was not returned within the timeout.
Other callers of getRef however should not get the null value as it will
cause NPE.
Make getRef throw the exception, thus failing the test early, and add a
variant method "checkedGetRef" which returns null and is used in the
consumer.
Also replace usage of printStackTrace with FluentLogger.
Change-Id: I0f0caca03386c4fa5710f4c8e8fd4f798acead2b
- ReplicationIT: Add explicit test for replication of new branch
Change-Id: I67aa8b4aec05ad23b3c286d56a3b894eede7cd7e
- ReplicationIT: Change test method name to reflect actual operation
The test shouldReplicateNewBranch creates a new change and then
verifies that the corresponding refs/changes/xx/yy/zzzzzz ref is
replicated to the destination.
Rename it to shouldReplicateNewChangeRef to match what it's actually
doing.
Change-Id: I32fe7237c8857907dd51d627a571f6ccb73741a3
- Allow AdminApiFactory to be replaced dynamically
Since change Ie760bf3e1 the GerritSshApi class is no longer a singleton,
and is instead instantiated on demand by a new AdminApiFactory.
This breaks implementations that consume the replication plugin as a
library and extend the GerritSshApi, since the extended class no longer
gets instantiated in place of GerritSshApi.
Refactor it so that AdminApiFactory is an interface with a default
implementation that gets bound as a dynamic item, which can be replaced
by derived implementations.
Change-Id: Ia150d6802e11015fa00ee9144b3dfbfa696c7a0d
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
diff --git a/plugins/replication b/plugins/replication
index 86b3ac8..896e671 160000
--- a/plugins/replication
+++ b/plugins/replication
@@ -1 +1 @@
-Subproject commit 86b3ac835c651cbaff0c0dd9b2540ceee4c32a78
+Subproject commit 896e67184e9b98262775ab1c71a0b76ac5baff21