sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefane...@apache.org
Subject svn commit: r1602899 - /sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java
Date Mon, 16 Jun 2014 15:32:37 GMT
Author: stefanegli
Date: Mon Jun 16 15:32:36 2014
New Revision: 1602899

URL: http://svn.apache.org/r1602899
Log:
SLING-3495 : using default timeout of 30s instead of 20s - plus using TimeoutProvider which
allows to configure an additional factor - to adjust for slow machines, thanks @bdelacretaz
for the pointer

Modified:
    sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java

Modified: sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java?rev=1602899&r1=1602898&r2=1602899&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java
(original)
+++ sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java
Mon Jun 16 15:32:36 2014
@@ -26,6 +26,7 @@ import org.apache.sling.commons.testing.
 import org.apache.sling.commons.testing.junit.RetryRule;
 import org.apache.sling.discovery.TopologyView;
 import org.apache.sling.discovery.impl.setup.Instance;
+import org.apache.sling.testing.tools.sling.TimeoutsProvider;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Rule;
@@ -35,7 +36,7 @@ import org.slf4j.LoggerFactory;
 
 public class LargeTopologyWithHubTest {
 
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+    private static final Logger logger = LoggerFactory.getLogger(LargeTopologyWithHubTest.class);
 
     private static List<Instance> instances;
     private static Instance hub;
@@ -52,8 +53,13 @@ public class LargeTopologyWithHubTest {
         
         slingIds = new LinkedList<String>();
         slingIds.add(hub.getSlingId());
+        final int defaultHeartbeatTimeout = 30;
+        final int heartbeatTimeout = TimeoutsProvider.getInstance().getTimeout(defaultHeartbeatTimeout);
+        logger.info("setUp: using heartbeatTimeout of "+heartbeatTimeout+"sec "
+                + "(default: "+defaultHeartbeatTimeout+")");
         for(int i=0; i<TEST_SIZE; i++) {
             Instance instance = TopologyTestHelper.createInstance(instances, "instance"+i);
+            instance.getConfig().setHeartbeatTimeout(heartbeatTimeout);
             new Connector(instance, hub);
             slingIds.add(instance.getSlingId());
         }



Mime
View raw message