You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by st...@apache.org on 2015/02/05 12:18:40 UTC

svn commit: r1657535 - /sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/cluster/ClusterTest.java

Author: stefanegli
Date: Thu Feb  5 11:18:40 2015
New Revision: 1657535

URL: http://svn.apache.org/r1657535
Log:
SLING-4139 et al : prepare4139() was only doing a stopHeartbeats() on instance1 - but it did not do a proper stop() - this had a negative side-effect of subsequent tests due to the fact that instance1 (the suposedly crashed one) was still receiving observation events and thus fiddled with subsequent tests - causing odd failures at times.

Modified:
    sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/cluster/ClusterTest.java

Modified: sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/cluster/ClusterTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/cluster/ClusterTest.java?rev=1657535&r1=1657534&r2=1657535&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/cluster/ClusterTest.java (original)
+++ sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/cluster/ClusterTest.java Thu Feb  5 11:18:40 2015
@@ -673,6 +673,7 @@ public class ClusterTest {
         logger.info("instance3.slingId="+instance3.slingId);
         final String instance1SlingId = instance1.slingId;
         instance1.stopHeartbeats(); // and have instance3 no longer pinging instance1
+        instance1.stop(); // otherwise it will have itself still registered with the observation manager and fiddle with future events..
         instance1 = null; // set to null to early fail if anyone still assumes (original) instance1 is up form now on
         instance2.getConfig().setHeartbeatTimeout(1); // set instance2's heartbeatTimeout to 1 sec to time out instance1 quickly!
         instance3.getConfig().setHeartbeatTimeout(1); // set instance3's heartbeatTimeout to 1 sec to time out instance1 quickly!