[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/misc ...
Manik Surtani
msurtani at jboss.com
Thu Jul 20 05:03:54 EDT 2006
User: msurtani
Date: 06/07/20 05:03:54
Modified: tests/functional/org/jboss/cache/misc TestingUtil.java
Log:
Fixed some broken UTs to use the new xml parsers, cache factories, etc.
Revision Changes Path
1.6 +7 -11 JBossCache/tests/functional/org/jboss/cache/misc/TestingUtil.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TestingUtil.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/misc/TestingUtil.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- TestingUtil.java 20 Jul 2006 06:04:57 -0000 1.5
+++ TestingUtil.java 20 Jul 2006 09:03:54 -0000 1.6
@@ -7,10 +7,9 @@
package org.jboss.cache.misc;
-import java.util.Vector;
-
import org.jboss.cache.TreeCache;
-import org.jboss.cache.TreeCacheMBean;
+
+import java.util.Vector;
/**
* Utilities for unit testing JBossCache.
@@ -49,14 +48,13 @@
* Loops, continually calling {@link #areCacheViewsComplete(TreeCache[])}
* until it either returns true or <code>timeout</code> ms have elapsed.
*
- * @param caches caches which must all have consistent views
* @param groupSize number of caches expected in the group
* @param timeout max number of ms to loop
*
* @throws RuntimeException if <code>timeout</code> ms have elapse without
* all caches having the same number of members.
*/
- public static void blockUntilViewReceived(TreeCacheMBean cache, int groupSize, long timeout)
+ public static void blockUntilViewReceived(TreeCache cache, int groupSize, long timeout)
{
long failTime = System.currentTimeMillis() + timeout;
@@ -82,13 +80,13 @@
* @throws IllegalStateException if any of the caches have MORE view
* members than caches.length
*/
- public static boolean areCacheViewsComplete(TreeCacheMBean[] caches)
+ public static boolean areCacheViewsComplete(TreeCache[] caches)
{
int memberCount = caches.length;
for (int i = 0; i < memberCount; i++)
{
- TreeCacheMBean cache = caches[i];
+ TreeCache cache = caches[i];
return isCacheViewComplete(cache, memberCount);
}
@@ -96,13 +94,11 @@
}
/**
- * FIXME Comment this
*
* @param cache
* @param memberCount
- * @return
*/
- public static boolean isCacheViewComplete(TreeCacheMBean cache, int memberCount)
+ public static boolean isCacheViewComplete(TreeCache cache, int memberCount)
{
Vector members = cache.getMembers();
if (members == null || memberCount > members.size())
More information about the jboss-cvs-commits
mailing list