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

Manik Surtani msurtani at jboss.com
Thu Jul 20 06:32:04 EDT 2006


  User: msurtani
  Date: 06/07/20 06:32:03

  Modified:    tests/functional/org/jboss/cache/replicated 
                        ReplicationExceptionTest.java
  Log:
  Fixed some broken UTs to use the new xml parsers, cache factories, etc.
  
  Revision  Changes    Path
  1.4       +14 -13    JBossCache/tests/functional/org/jboss/cache/replicated/ReplicationExceptionTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicationExceptionTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/replicated/ReplicationExceptionTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- ReplicationExceptionTest.java	13 Feb 2006 15:57:50 -0000	1.3
  +++ ReplicationExceptionTest.java	20 Jul 2006 10:32:03 -0000	1.4
  @@ -13,6 +13,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.TreeCache;
  +import org.jboss.cache.config.Configuration;
   import org.jboss.cache.lock.IsolationLevel;
   import org.jboss.cache.transaction.DummyTransactionManager;
   
  @@ -27,12 +28,12 @@
   /**
    * Teting of replication exception for a Nonerislizable object
    *
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    * @author Ben Wang
    */
   public class ReplicationExceptionTest extends TestCase {
      TreeCache cache1, cache2;
  -   int caching_mode=TreeCache.REPL_SYNC;
  +   Configuration.CacheMode caching_mode= Configuration.CacheMode.REPL_SYNC;
      final String group_name="TreeCacheTestGroup";
      String props=
            "UDP(ip_mcast=true;ip_ttl=64;loopback=false;mcast_addr=228.1.2.3;" +
  @@ -84,23 +85,23 @@
         return mgr.getTransaction();
      }
   
  -   void initCaches(int caching_mode) throws Exception {
  +   void initCaches(Configuration.CacheMode caching_mode) throws Exception {
         this.caching_mode=caching_mode;
         cache1=new TreeCache();
         cache2=new TreeCache();
  -      cache1.setCacheMode(caching_mode);
  -      cache2.setCacheMode(caching_mode);
  -      cache1.setIsolationLevel(IsolationLevel.SERIALIZABLE);
  -      cache2.setIsolationLevel(IsolationLevel.SERIALIZABLE);
  +      cache1.getConfiguration().setCacheMode(caching_mode);
  +      cache2.getConfiguration().setCacheMode(caching_mode);
  +      cache1.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
  +      cache2.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
   
  -      cache1.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  -      cache2.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +      cache1.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +      cache2.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         /*
         cache1.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
         cache2.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
   */
  -      cache1.setLockAcquisitionTimeout(5000);
  -      cache2.setLockAcquisitionTimeout(5000);
  +      cache1.getConfiguration().setLockAcquisitionTimeout(5000);
  +      cache2.getConfiguration().setLockAcquisitionTimeout(5000);
         cache1.start();
         cache2.start();
      }
  @@ -116,7 +117,7 @@
   
      public void testNonSerializableRepl() throws Exception {
         try {
  -         initCaches(TreeCache.REPL_SYNC);
  +         initCaches(Configuration.CacheMode.REPL_SYNC);
   
            cache1.put("/a/b/c", "test", new ContainerData());
   
  @@ -141,7 +142,7 @@
         Transaction tx;
   
         try {
  -         initCaches(TreeCache.REPL_SYNC);
  +         initCaches(Configuration.CacheMode.REPL_SYNC);
   
            tx=beginTransaction();
            cache1.put("/a/b/c", "test", new ContainerData());
  
  
  



More information about the jboss-cvs-commits mailing list