[jboss-cvs] JBossCache/tests-50/functional/org/jboss/cache/pojo ...
Ben Wang
bwang at jboss.com
Mon Oct 9 04:14:51 EDT 2006
User: bwang
Date: 06/10/09 04:14:51
Modified: tests-50/functional/org/jboss/cache/pojo NewLocalTest.java
TestingUtil.java
Log:
New region tests
Revision Changes Path
1.8 +2 -2 JBossCache/tests-50/functional/org/jboss/cache/pojo/NewLocalTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NewLocalTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/NewLocalTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- NewLocalTest.java 8 Sep 2006 07:55:59 -0000 1.7
+++ NewLocalTest.java 9 Oct 2006 08:14:51 -0000 1.8
@@ -57,7 +57,7 @@
try
{
- cache_.attach(InternalConstant.JBOSS_INTERNAL.toString(), test);
+ cache_.attach(InternalConstant.JBOSS_INTERNAL_STRING, test);
fail("putObject under JBoss_Internal should fail");
} catch (IllegalArgumentException iex)
{
@@ -66,7 +66,7 @@
try
{
- cache_.detach(InternalConstant.JBOSS_INTERNAL.toString());
+ cache_.detach(InternalConstant.JBOSS_INTERNAL_STRING);
fail("putObject under JBoss_Internal should fail");
} catch (IllegalArgumentException iex)
{
1.3 +10 -8 JBossCache/tests-50/functional/org/jboss/cache/pojo/TestingUtil.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TestingUtil.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/TestingUtil.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- TestingUtil.java 27 Jun 2006 09:19:31 -0000 1.2
+++ TestingUtil.java 9 Oct 2006 08:14:51 -0000 1.3
@@ -7,7 +7,8 @@
package org.jboss.cache.pojo;
-import org.jboss.cache.TreeCacheMBean;
+import org.jboss.cache.TreeCache;
+import org.jboss.cache.TreeCacheProxyImpl;
import java.util.Vector;
@@ -15,7 +16,7 @@
* Utilities for unit testing JBossCache.
*
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class TestingUtil
{
@@ -26,7 +27,7 @@
* @throws RuntimeException if <code>timeout</code> ms have elapse without
* all caches having the same number of members.
*/
- public static void blockUntilViewsReceived(TreeCacheMBean[] caches, long timeout)
+ public static void blockUntilViewsReceived(PojoCache[] caches, long timeout)
{
long failTime = System.currentTimeMillis() + timeout;
@@ -42,14 +43,15 @@
/**
*/
- public static void blockUntilViewReceived(TreeCacheMBean cache, int groupSize, long timeout)
+ public static void blockUntilViewReceived(PojoCache cache, int groupSize, long timeout)
{
long failTime = System.currentTimeMillis() + timeout;
+ TreeCache tcache = ((TreeCacheProxyImpl)cache.getCache()).getTreeCache();
while (System.currentTimeMillis() < failTime)
{
org.jboss.cache.pojo.TestingUtil.sleepThread(100);
- if (org.jboss.cache.pojo.TestingUtil.isCacheViewComplete(cache, groupSize))
+ if (org.jboss.cache.pojo.TestingUtil.isCacheViewComplete(tcache, groupSize))
return;
}
@@ -67,13 +69,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(PojoCache[] caches)
{
int memberCount = caches.length;
for (int i = 0; i < memberCount; i++)
{
- TreeCacheMBean cache = caches[i];
+ TreeCache cache = ((TreeCacheProxyImpl)caches[i].getCache()).getTreeCache();
return org.jboss.cache.pojo.TestingUtil.isCacheViewComplete(cache, memberCount);
}
@@ -86,7 +88,7 @@
* @param cache
* @param memberCount
*/
- 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