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

Manik Surtani msurtani at jboss.com
Thu Jul 20 06:54:00 EDT 2006


  User: msurtani
  Date: 06/07/20 06:54:00

  Modified:    tests/functional/org/jboss/cache/aop 
                        LocalConcurrentTest.java
  Log:
  Fixed some broken UTs to use the new xml parsers, cache factories, etc.
  
  Revision  Changes    Path
  1.9       +8 -8      JBossCache/tests/functional/org/jboss/cache/aop/LocalConcurrentTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LocalConcurrentTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/LocalConcurrentTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- LocalConcurrentTest.java	1 Jun 2006 02:14:23 -0000	1.8
  +++ LocalConcurrentTest.java	20 Jul 2006 10:54:00 -0000	1.9
  @@ -13,9 +13,9 @@
   import junit.framework.TestSuite;
   import org.jboss.cache.CacheException;
   import org.jboss.cache.PropertyConfigurator;
  -import org.jboss.cache.TreeCache;
   import org.jboss.cache.aop.test.Address;
   import org.jboss.cache.aop.test.Person;
  +import org.jboss.cache.config.Configuration;
   import org.jboss.cache.lock.IsolationLevel;
   import org.jboss.cache.lock.LockStrategyFactory;
   import org.jboss.cache.lock.UpgradeException;
  @@ -34,13 +34,13 @@
    * Local mode stress test for PojoCache. Test getObject and putObject under load
    * and concurrency.
    *
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    * @author<a href="mailto:bwang at jboss.org">Ben Wang</a> December 2004
    */
   public class LocalConcurrentTest extends TestCase
   {
      static PojoCache cache_;
  -   int cachingMode_ = TreeCache.LOCAL;
  +   Configuration.CacheMode cachingMode_ = Configuration.CacheMode.LOCAL;
      Properties p_;
      String oldFactory_ = null;
      final String FACTORY = "org.jboss.cache.transaction.DummyContextFactory";
  @@ -70,7 +70,7 @@
   
         tx_ = (UserTransaction)new InitialContext(p_).lookup("UserTransaction");
   
  -      initCaches(TreeCache.LOCAL);
  +      initCaches(Configuration.CacheMode.LOCAL);
         nodeList_ = nodeGen(depth_, children_);
   
         log("LocalConcurrentTestCase: cacheMode=TRANSIENT, one cache");
  @@ -90,13 +90,13 @@
   
      }
   
  -   void initCaches(int caching_mode) throws Exception
  +   void initCaches(Configuration.CacheMode caching_mode) throws Exception
      {
         cachingMode_ = caching_mode;
         cache_ = new PojoCache();
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache_, "META-INF/local-service.xml"); // read in generic local xml
  -      cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +      cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         cache_.createService();
         cache_.startService();
      }
  @@ -111,14 +111,14 @@
      {
         log("set lock level to RWUpgrade ...");
         LockStrategyFactory.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
  -      cache_.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
  +      cache_.getConfiguration().setIsolationLevel(IsolationLevel.REPEATABLE_READ);
      }
   
      protected void setLevelSerial()
      {
         log("set lock level to SimpleLock ...");
         LockStrategyFactory.setIsolationLevel(IsolationLevel.SERIALIZABLE);
  -      cache_.setIsolationLevel(IsolationLevel.SERIALIZABLE);
  +      cache_.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
      }
   
      public void testAll_RWLock() throws Exception
  
  
  



More information about the jboss-cvs-commits mailing list