PushOne: Remove unused addRef() method This is only used by tests and should have been removed when addRefBatch() superseded it. Change-Id: If9de1df29fd56a595fa4d4b2b4f5716264a67e11 Release-Notes: skip
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java index ed84087..6feba66 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -287,10 +287,6 @@ return uri; } - void addRef(String ref) { - addRefBatch(ImmutableSet.of(ref)); - } - void addRefBatch(ImmutableSet<String> refBatch) { if (refBatch.size() == 1 && refBatch.contains(ALL_REFS)) { refBatchesToPush.clear();
diff --git a/src/test/java/com/googlesource/gerrit/plugins/replication/PushOneTest.java b/src/test/java/com/googlesource/gerrit/plugins/replication/PushOneTest.java index 8664adc..21fe85c 100644 --- a/src/test/java/com/googlesource/gerrit/plugins/replication/PushOneTest.java +++ b/src/test/java/com/googlesource/gerrit/plugins/replication/PushOneTest.java
@@ -202,7 +202,7 @@ PushOne pushOne = createPushOne(replicationPushFilter); - pushOne.addRef(PushOne.ALL_REFS); + pushOne.addRefBatch(ImmutableSet.of(PushOne.ALL_REFS)); pushOne.run(); isCallFinished.await(TEST_PUSH_TIMEOUT_SECS, TimeUnit.SECONDS); @@ -224,7 +224,7 @@ PushOne pushOne = createPushOne(replicationPushFilter); - pushOne.addRef(PushOne.ALL_REFS); + pushOne.addRefBatch(ImmutableSet.of(PushOne.ALL_REFS)); pushOne.run(); isCallFinished.await(10, TimeUnit.SECONDS); @@ -351,7 +351,7 @@ when(gitRepositoryManagerMock.openRepository(projectNameKey)) .thenThrow(new RepositoryNotFoundException("not found")); PushOne pushOne = createPushOne(null); - pushOne.addRef(PushOne.ALL_REFS); + pushOne.addRefBatch(ImmutableSet.of(PushOne.ALL_REFS)); pushOne.setToRetry(); pushOne.run(); assertThat(pushOne.isRetrying()).isFalse(); @@ -363,7 +363,7 @@ NEW, "bar", ObjectId.fromString("0000000000000000000000000000000000000001")); localRefs.add(barLocalRef); - pushOne.addRef(PushOne.ALL_REFS); + pushOne.addRefBatch(ImmutableSet.of(PushOne.ALL_REFS)); pushOne.run(); isCallFinished.await(TEST_PUSH_TIMEOUT_SECS, TimeUnit.SECONDS);