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

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/eviction  
                        MRUPolicyTest.java ReplicatedAopLRUPolicyTest.java
  Log:
  Fixed some broken UTs to use the new xml parsers, cache factories, etc.
  
  Revision  Changes    Path
  1.6       +8 -8      JBossCache/tests/functional/org/jboss/cache/eviction/MRUPolicyTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MRUPolicyTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/MRUPolicyTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- MRUPolicyTest.java	5 May 2006 12:06:57 -0000	1.5
  +++ MRUPolicyTest.java	20 Jul 2006 09:03:53 -0000	1.6
  @@ -7,16 +7,16 @@
   package org.jboss.cache.eviction;
   
   import junit.framework.TestCase;
  -import org.jboss.cache.PropertyConfigurator;
   import org.jboss.cache.TreeCache;
  -import org.jboss.cache.misc.TestingUtil;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jboss.cache.lock.IsolationLevel;
  +import org.jboss.cache.misc.TestingUtil;
   
   /**
    * Unit tests for MRUPolicy.
    *
    * @author Daniel Huang (dhuang at jboss.org)
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public class MRUPolicyTest extends TestCase
   {
  @@ -50,10 +50,10 @@
      private void initCaches() throws Exception
      {
         cache = new TreeCache();
  -      PropertyConfigurator config = new PropertyConfigurator();
  -      config.configure(cache, "META-INF/local-mru-eviction-service.xml"); // read in generic local xml
  -      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  -      cache.setIsolationLevel(IsolationLevel.SERIALIZABLE);
  +      XmlConfigurationParser parser = new XmlConfigurationParser();
  +      cache.setConfiguration(parser.parseFile("META-INF/local-mru-eviction-service.xml")); // read in generic local xml
  +      cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +      cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
         cache.startService();
      }
   
  @@ -139,7 +139,7 @@
   
      public void testConcurrentPutAndEvict() throws Exception
      {
  -      cache.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
  +      cache.getConfiguration().setIsolationLevel(IsolationLevel.REPEATABLE_READ);
         cache.put(ROOT_STR + "/concurrentPutAndEvict", "value", new Integer(1));
   
         for (int i = 0; i < 10; i++)
  
  
  
  1.7       +3 -3      JBossCache/tests/functional/org/jboss/cache/eviction/ReplicatedAopLRUPolicyTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedAopLRUPolicyTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ReplicatedAopLRUPolicyTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- ReplicatedAopLRUPolicyTest.java	5 May 2006 12:06:57 -0000	1.6
  +++ ReplicatedAopLRUPolicyTest.java	20 Jul 2006 09:03:53 -0000	1.7
  @@ -27,7 +27,7 @@
      {
         super.setUp();
         cache_ = new TreeCache();
  -      cache_.setUseMarshalling(true);
  +      cache_.getConfiguration().setUseRegionBasedMarshalling(true);
         initCaches(cache_);
   //      cache1_ = new TreeCache();
   //      initCaches(cache1_);
  @@ -37,7 +37,7 @@
         cache2_ = new TreeCache();
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache2_, "META-INF/replSync-service.xml"); // read in generic local xml
  -      cache2_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +      cache2_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         cache2_.startService();
   
         wakeupIntervalMillis_ = cache_.getEvictionThreadWakeupIntervalSeconds() *1000;
  @@ -50,7 +50,7 @@
      {
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache, "META-INF/replSync-eviction-service.xml"); // read in generic local xml
  -      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +      cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      }
   
      public void tearDown() throws Exception
  
  
  



More information about the jboss-cvs-commits mailing list