[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/invalidation ...
Manik Surtani
msurtani at jboss.com
Thu Jul 20 05:03:53 EDT 2006
User: msurtani
Date: 06/07/20 05:03:53
Modified: tests/functional/org/jboss/cache/invalidation
InvalidationInterceptorTest.java
Log:
Fixed some broken UTs to use the new xml parsers, cache factories, etc.
Revision Changes Path
1.15 +13 -10 JBossCache/tests/functional/org/jboss/cache/invalidation/InvalidationInterceptorTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: InvalidationInterceptorTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/invalidation/InvalidationInterceptorTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- InvalidationInterceptorTest.java 5 May 2006 12:06:58 -0000 1.14
+++ InvalidationInterceptorTest.java 20 Jul 2006 09:03:53 -0000 1.15
@@ -15,6 +15,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.TreeCache;
+import org.jboss.cache.config.Configuration;
import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.xml.XmlHelper;
import org.w3c.dom.Element;
@@ -103,8 +104,8 @@
{
TreeCache cache1 = createUnstartedCache( false );
TreeCache cache2 = createUnstartedCache( false );
- cache1.setCacheMode(TreeCache.INVALIDATION_ASYNC);
- cache2.setCacheMode(TreeCache.INVALIDATION_ASYNC);
+ cache1.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_ASYNC);
+ cache2.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_ASYNC);
cache1.startService();
cache2.startService();
@@ -301,8 +302,8 @@
{
TreeCache cache1 = createUnstartedCache(false);
TreeCache cache2 = createUnstartedCache(false);
- cache1.setCacheMode(TreeCache.INVALIDATION_ASYNC);
- cache2.setCacheMode(TreeCache.INVALIDATION_ASYNC);
+ cache1.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_ASYNC);
+ cache2.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_ASYNC);
cache1.startService();
cache2.startService();
@@ -521,10 +522,12 @@
protected TreeCache createUnstartedCache(boolean optimistic) throws Exception
{
- TreeCache cache = new TreeCache("MyCluster", null, 3000);
- cache.setCacheMode(TreeCache.INVALIDATION_SYNC);
- if (optimistic) cache.setNodeLockingScheme("OPTIMISTIC");
- cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ TreeCache cache = new TreeCache();
+ cache.getConfiguration().setClusterName("MyCluster");
+ cache.getConfiguration().setInitialStateRetrievalTimeout(3000);
+ cache.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_SYNC);
+ if (optimistic) cache.getConfiguration().setNodeLockingScheme("OPTIMISTIC");
+ cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
return cache;
}
protected TreeCache createCache(boolean optimistic) throws Exception
@@ -540,8 +543,8 @@
caches[0] = createUnstartedCache(optimistic);
caches[1] = createUnstartedCache(optimistic);
- caches[0].setCacheLoaderConfiguration(getCacheLoaderConfig());
- caches[1].setCacheLoaderConfiguration(getCacheLoaderConfig());
+ caches[0].getConfiguration().setCacheLoaderConfiguration(getCacheLoaderConfig());
+ caches[1].getConfiguration().setCacheLoaderConfiguration(getCacheLoaderConfig());
caches[0].startService();
caches[1].startService();
More information about the jboss-cvs-commits
mailing list