Author: stefanegli
Date: Mon Jun 29 15:18:02 2015
New Revision: 1688250

URL: http://svn.apache.org/r1688250
Log:
@no-jira : more debug info in case of failure as recently on jenkins

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=1688250&r1=1688249&r2=1688250&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
 Mon Jun 29 15:18:02 2015
@@ -752,10 +752,11 @@ public class ClusterTest {
 
        private void assertTopology(Instance instance, SimpleClusterView... 
assertedClusterViews) {
        final TopologyView topology = 
instance.getDiscoveryService().getTopology();
+       logger.info("assertTopology: instance "+instance.slingId+" sees 
topology: "+topology+", expected: "+assertedClusterViews);
        assertNotNull(topology);
        if (assertedClusterViews.length!=topology.getClusterViews().size()) {
             dumpFailureDetails(topology, assertedClusterViews);
-           fail("expected "+assertedClusterViews.length+", got: 
"+topology.getClusterViews().size());
+           fail("instance "+instance.slingId+ " expected 
"+assertedClusterViews.length+", got: "+topology.getClusterViews().size());
        }
        final Set<ClusterView> actualClusters = new 
HashSet<ClusterView>(topology.getClusterViews());
        for(int i=0; i<assertedClusterViews.length; i++) {
@@ -772,7 +773,7 @@ public class ClusterTest {
                        }
                if (!foundMatch) {
                    dumpFailureDetails(topology, assertedClusterViews);
-                       fail("could not find a match in the topology with 
instance="+instance.slingId+" and clusterViews="+assertedClusterViews.length);
+                       fail("instance "+instance.slingId+ " could not find a 
match in the topology with instance="+instance.slingId+" and 
clusterViews="+assertedClusterViews.length);
                }
        }
        assertEquals("not all asserted clusterviews are in the actual view with 
instance="+instance+" and clusterViews="+assertedClusterViews, 
actualClusters.size(), 0);


Reply via email to