summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Miller <marco.miller@ericsson.com>2020-10-01 11:28:45 -0400
committerMarco Miller <marco.miller@ericsson.com>2020-10-01 11:34:38 -0400
commitf199a25008c424af21bba9d7644c139cb8aaa97e (patch)
tree74da8ad8547d4ca0b2f27759b892c680c8bf59c4
parentacfcd797f0b036b145ceaf3eb42881776e850da8 (diff)
parent6d0b12c83001805bfc740e3dabd37223acc294d8 (diff)
Merge branch 'stable-2.16' into stable-3.0v3.0.13
* stable-2.16: Make the shouldReplicateNewProject test more reliable Change-Id: I447043d502987070bc395936484a1cb23a5ddabc
-rw-r--r--src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java9
1 files changed, 8 insertions, 1 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 0074075..017be91 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java
@@ -64,9 +64,14 @@ public class ReplicationIT extends LightweightPluginDaemonTest {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private static final int TEST_REPLICATION_DELAY = 1;
private static final int TEST_REPLICATION_RETRY = 1;
+ private static final int TEST_PROJECT_CREATION_SECONDS = 10;
private static final Duration TEST_TIMEOUT =
Duration.ofSeconds((TEST_REPLICATION_DELAY + TEST_REPLICATION_RETRY * 60) + 1);
+ private static final Duration TEST_NEW_PROJECT_TIMEOUT =
+ Duration.ofSeconds(
+ (TEST_REPLICATION_DELAY + TEST_REPLICATION_RETRY * 60) + TEST_PROJECT_CREATION_SECONDS);
+
@Inject private SitePaths sitePaths;
@Inject private ProjectOperations projectOperations;
@Inject private DynamicSet<ProjectDeletedListener> deletedListeners;
@@ -106,7 +111,9 @@ public class ReplicationIT extends LightweightPluginDaemonTest {
assertThat(listReplicationTasks("refs/meta/config")).hasSize(1);
- waitUntil(() -> nonEmptyProjectExists(new Project.NameKey(sourceProject + "replica")));
+ WaitUtil.waitUntil(
+ () -> nonEmptyProjectExists(new Project.NameKey(sourceProject + "replica.git")),
+ TEST_NEW_PROJECT_TIMEOUT);
ProjectInfo replicaProject = gApi.projects().name(sourceProject + "replica").get();
assertThat(replicaProject).isNotNull();