sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefane...@apache.org
Subject svn commit: r1651143 - /sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/TopologyTest.java
Date Mon, 12 Jan 2015 17:04:45 GMT
Author: stefanegli
Date: Mon Jan 12 17:04:45 2015
New Revision: 1651143

URL: http://svn.apache.org/r1651143
Log:
SLING-4300 : increasing heartbeat timeout during first 1.5sec sleep to 3sec to reduce likelihood
of failure

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

Modified: sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/TopologyTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/TopologyTest.java?rev=1651143&r1=1651142&r2=1651143&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/TopologyTest.java
(original)
+++ sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/TopologyTest.java
Mon Jan 12 17:04:45 2015
@@ -90,7 +90,8 @@ public class TopologyTest {
                 instance2.getAnnouncementRegistry().listLocalAnnouncements();
         assertEquals(1, instance2LocalAnnouncements.size());
 
-        Thread.sleep(1500);
+        instance1.getConfig().setHeartbeatTimeout(3); // increasing heartbeat timeout from
2 to 3sec
+        Thread.sleep(1500); // heartbeat interval is 1 sec - so 1.5 sec ensures 1 heartbeat
is actually being sent out!
         
         instance1LocalAnnouncements = 
                 instance1.getAnnouncementRegistry().listLocalAnnouncements();
@@ -98,6 +99,7 @@ public class TopologyTest {
         instance2LocalAnnouncements = 
                 instance2.getAnnouncementRegistry().listLocalAnnouncements();
         assertEquals(0, instance2LocalAnnouncements.size());
+        instance1.getConfig().setHeartbeatTimeout(2);
 
         TopologyTestHelper.assertTopologyConsistsOf(instance1.getDiscoveryService().getTopology(),
instance1.getSlingId(), instance2.getSlingId());
         TopologyTestHelper.assertTopologyConsistsOf(instance2.getDiscoveryService().getTopology(),
instance2.getSlingId());



Mime
View raw message