[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/mgmt ...

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/mgmt   
                        InvalidationTest.java NotificationTest.java
                        TxTest.java
  Log:
  Fixed some broken UTs to use the new xml parsers, cache factories, etc.
  
  Revision  Changes    Path
  1.5       +3 -3      JBossCache/tests/functional/org/jboss/cache/mgmt/InvalidationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InvalidationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/mgmt/InvalidationTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- InvalidationTest.java	20 Jul 2006 08:05:18 -0000	1.4
  +++ InvalidationTest.java	20 Jul 2006 09:03:54 -0000	1.5
  @@ -15,7 +15,7 @@
   /**
    * Simple functional tests for InvalidationInterceptor statistics
    * @author Jerry Gauthier
  - * @version $Id: InvalidationTest.java,v 1.4 2006/07/20 08:05:18 msurtani Exp $
  + * @version $Id: InvalidationTest.java,v 1.5 2006/07/20 09:03:54 msurtani Exp $
    */
   public class InvalidationTest extends TestCase
   {
  @@ -141,7 +141,7 @@
         XmlConfigurationParser parser = new XmlConfigurationParser();
         Configuration c = parser.parseFile("META-INF/invalidationSync-service.xml");
         cache.setConfiguration(c); 
  -      c.setCacheModeInt(Configuration.CacheMode.INVALIDATION_SYNC);
  +      c.setCacheMode(Configuration.CacheMode.INVALIDATION_SYNC);
         c.setUseInterceptorMbeans(true);
         c.setClusterName(clusterName);
         cache.createService();
  
  
  
  1.5       +9 -8      JBossCache/tests/functional/org/jboss/cache/mgmt/NotificationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NotificationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/mgmt/NotificationTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- NotificationTest.java	18 Jul 2006 10:50:47 -0000	1.4
  +++ NotificationTest.java	20 Jul 2006 09:03:54 -0000	1.5
  @@ -9,6 +9,7 @@
   import org.jboss.cache.Fqn;
   import org.jboss.cache.PropertyConfigurator;
   import org.jboss.cache.TreeCache;
  +import org.jboss.cache.config.Configuration;
   import org.jboss.cache.interceptors.CacheMgmtInterceptor;
   import org.jboss.cache.loader.CacheLoader;
   import org.jboss.cache.xml.XmlHelper;
  @@ -27,7 +28,7 @@
   /**
    * Functional tests for CacheMgmtInterceptor broadcast of cache event notifications
    * @author Jerry Gauthier
  - * @version $Id: NotificationTest.java,v 1.4 2006/07/18 10:50:47 msurtani Exp $
  + * @version $Id: NotificationTest.java,v 1.5 2006/07/20 09:03:54 msurtani Exp $
    */
   public class NotificationTest extends TestCase
   {
  @@ -196,7 +197,7 @@
          cache.startService();
   
          // check that the correct locking scheme is in use
  -       assertEquals(optimistic, cache.isNodeLockingOptimistic());
  +       assertEquals(optimistic, cache.getConfiguration().isNodeLockingOptimistic());
   
          cache.put("/hello", "k", "v");
          assertEquals("Started", notifications.remove(0));
  @@ -218,14 +219,14 @@
         TreeCache cache = new TreeCache();
         PropertyConfigurator config=new PropertyConfigurator();
         config.configure(cache, "META-INF/replSync-service.xml");
  -      cache.setCacheMode(TreeCache.REPL_SYNC);
  -      cache.setCacheLoaderConfiguration(getCacheLoaderConfig("location="+getTempDir()));
  -      cache.setUseInterceptorMbeans(true);
  -      cache.setClusterName(clusterName);
  +      cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
  +      cache.getConfiguration().setCacheLoaderConfiguration(getCacheLoaderConfig("location="+getTempDir()));
  +      cache.getConfiguration().setUseInterceptorMbeans(true);
  +      cache.getConfiguration().setClusterName(clusterName);
         if (optimistic)
         {
  -          cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  -          cache.setNodeLockingScheme("OPTIMISTIC");
  +          cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +          cache.getConfiguration().setNodeLockingScheme("OPTIMISTIC");
         }
         cache.createService();
         // start the cache after the listener has been registered
  
  
  
  1.4       +6 -5      JBossCache/tests/functional/org/jboss/cache/mgmt/TxTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TxTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/mgmt/TxTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- TxTest.java	9 May 2006 15:46:34 -0000	1.3
  +++ TxTest.java	20 Jul 2006 09:03:54 -0000	1.4
  @@ -6,6 +6,7 @@
   import org.jboss.cache.Fqn;
   import org.jboss.cache.PropertyConfigurator;
   import org.jboss.cache.TreeCache;
  +import org.jboss.cache.config.Configuration;
   import org.jboss.cache.interceptors.TxInterceptor;
   
   import javax.transaction.TransactionManager;
  @@ -15,7 +16,7 @@
   /**
    * Simple functional tests for TxInterceptor statistics
    * @author Jerry Gauthier
  - * @version $Id: TxTest.java,v 1.3 2006/05/09 15:46:34 msurtani Exp $
  + * @version $Id: TxTest.java,v 1.4 2006/07/20 09:03:54 msurtani Exp $
    */
   public class TxTest extends TestCase
   {
  @@ -208,10 +209,10 @@
         TreeCache cache = new TreeCache();
         PropertyConfigurator config=new PropertyConfigurator();
         config.configure(cache, "META-INF/replSync-service.xml");
  -      cache.setUseRegionBasedMarshalling(false); 
  -      cache.setCacheMode(TreeCache.REPL_SYNC);
  -      cache.setUseInterceptorMbeans(true);
  -      cache.setClusterName(clusterName);
  +      cache.getConfiguration().setUseRegionBasedMarshalling(false);
  +      cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
  +      cache.getConfiguration().setUseInterceptorMbeans(true);
  +      cache.getConfiguration().setClusterName(clusterName);
         cache.createService();
         cache.startService();
         return cache;
  
  
  



More information about the jboss-cvs-commits mailing list