summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java')
-rw-r--r--src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java b/src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java
index 1bb0bbf..471d729 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java
@@ -143,11 +143,12 @@ public class ReplicationIT extends LightweightPluginDaemonTest {
assertThat(listReplicationTasks("refs/heads/(mybranch|master)")).hasSize(2);
- try (Repository repo = repoManager.openRepository(targetProject)) {
+ try (Repository repo = repoManager.openRepository(targetProject);
+ Repository sourceRepo = repoManager.openRepository(project)) {
waitUntil(() -> checkedGetRef(repo, newBranch) != null);
+ Ref masterRef = getRef(sourceRepo, master);
Ref targetBranchRef = getRef(repo, newBranch);
- Ref masterRef = getRef(repo, master);
assertThat(targetBranchRef).isNotNull();
assertThat(targetBranchRef.getObjectId()).isEqualTo(masterRef.getObjectId());
}