no-jira : added another safety sleep of 2sec for testConnectorSwitching4139 to make sure those heartbeats/votings going on there have enough time to settle
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1712754 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/test/java/org/apache/sling/discovery/base/its/AbstractClusterTest.java b/src/test/java/org/apache/sling/discovery/base/its/AbstractClusterTest.java
index 190a758..6690bb0 100644
--- a/src/test/java/org/apache/sling/discovery/base/its/AbstractClusterTest.java
+++ b/src/test/java/org/apache/sling/discovery/base/its/AbstractClusterTest.java
@@ -438,6 +438,8 @@
.setMinEventDelay(1)
.setSlingId(instance1.getSlingId()).build();
runHeartbeatOnceWith(instance1Restarted, instance2, instance3, instance5);
+ // give these heartbeats/votes some time .. so sleep 2sec (timeout is 10sec, so should be safe)
+ Thread.sleep(2000);
assertTrue(pingConnector(instance3, instance2));
assertTrue(pingConnector(instance5, instance2));
success = false;
@@ -476,7 +478,7 @@
if (i3ClusterSize==1) {
if (i<30) {
logger.info("testConnectorSwitching4139: [2] min loop cnt not yet reached: i="+i);
- Thread.sleep(500); // 30x500ms = 15sec max - (vs 10sec timeout) - should be enough for timing out
+ Thread.sleep(500); // 30x500ms = 15sec max - (vs 10sec-2sec[sleep] timeout) - should be enough for timing out
continue;
}
success = true;