[jbosscache-commits] JBoss Cache SVN: r7437 - core/trunk/src/test/java/org/jboss/cache/util.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Fri Jan 9 13:21:15 EST 2009


Author: mircea.markus
Date: 2009-01-09 13:21:15 -0500 (Fri, 09 Jan 2009)
New Revision: 7437

Modified:
   core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java
Log:
more detailed failure details

Modified: core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java	2009-01-09 18:08:05 UTC (rev 7436)
+++ core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java	2009-01-09 18:21:15 UTC (rev 7437)
@@ -155,9 +155,20 @@
          }
       }
 
-      throw new RuntimeException("timed out before caches had complete views");
+      throw new RuntimeException("timed out before caches had complete views" + views(caches));
    }
 
+   private static String views(Cache... caches)
+   {
+      StringBuilder builder = new StringBuilder("[\n");
+      for (Cache c:caches)
+      {
+         builder.append("   ").append(c.getLocalAddress()).append("->").append(c.getMembers()).append("\n");
+      }
+      builder.append("]");
+      return builder.toString();
+   }
+
    /**
     * Version of blockUntilViewsReceived that uses varargs
     */
@@ -188,7 +199,7 @@
          }
       }
 
-      throw new RuntimeException("timed out before caches had complete views");
+      throw new RuntimeException("timed out before caches had complete views" + views(caches));
    }
 
 
@@ -215,7 +226,7 @@
          }
       }
 
-      throw new RuntimeException("timed out before caches had complete views");
+      throw new RuntimeException("timed out before caches had complete views" + views(caches));
    }
 
    /**
@@ -245,7 +256,7 @@
          }
       }
 
-      throw new RuntimeException("timed out before caches had complete views");
+      throw new RuntimeException("timed out before caches had complete views" + views(cache));
    }
 
    /**




More information about the jbosscache-commits mailing list