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

Manik Surtani manik at jboss.org
Wed May 23 06:28:53 EDT 2007


  User: msurtani
  Date: 07/05/23 06:28:53

  Modified:    tests/functional/org/jboss/cache/pojo/region  
                        ReplicatedTest.java LocalConcurrentTest.java
  Log:
  Initiated a bunch of performance fixes, including replacing CopyOnWriteArraySets with org.jboss.cache.util.concurrent.ConcurrentHashSet.
  Also ran an imports optimiser on the code base - there were a lot of unused imports floating about.
  
  Revision  Changes    Path
  1.3       +9 -7      JBossCache/tests/functional/org/jboss/cache/pojo/region/ReplicatedTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/region/ReplicatedTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- ReplicatedTest.java	16 Apr 2007 17:37:12 -0000	1.2
  +++ ReplicatedTest.java	23 May 2007 10:28:53 -0000	1.3
  @@ -7,17 +7,18 @@
   
   package org.jboss.cache.pojo.region;
   
  -import junit.framework.TestCase;
   import junit.framework.Test;
  +import junit.framework.TestCase;
   import junit.framework.TestSuite;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.jboss.cache.Fqn;
   import org.jboss.cache.config.Configuration.CacheMode;
   import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
  -import org.jboss.cache.pojo.*;
  +import org.jboss.cache.pojo.PojoCache;
  +import org.jboss.cache.pojo.PojoCacheFactory;
   import org.jboss.cache.pojo.test.Person;
   import org.jboss.cache.pojo.test.Student;
  -import org.jboss.cache.Fqn;
   
   import java.util.List;
   
  @@ -108,7 +109,8 @@
                    ((Person) cache1.find("/person/test3")).getMedication().get(1));
            cache.detach("/person/test3");
   
  -      } catch (Exception e)
  +      }
  +      catch (Exception e)
         {
            // should be thrown
         }
  
  
  
  1.2       +14 -10    JBossCache/tests/functional/org/jboss/cache/pojo/region/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/pojo/region/LocalConcurrentTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- LocalConcurrentTest.java	13 Jan 2007 15:55:06 -0000	1.1
  +++ LocalConcurrentTest.java	23 May 2007 10:28:53 -0000	1.2
  @@ -7,28 +7,30 @@
   
   package org.jboss.cache.pojo.region;
   
  -import junit.framework.TestCase;
   import junit.framework.Test;
  +import junit.framework.TestCase;
   import junit.framework.TestSuite;
  -import org.jboss.cache.pojo.*;
  -import org.jboss.cache.pojo.test.Person;
  +import org.jboss.cache.Fqn;
  +import org.jboss.cache.lock.UpgradeException;
  +import org.jboss.cache.pojo.PojoCache;
  +import org.jboss.cache.pojo.PojoCacheFactory;
  +import org.jboss.cache.pojo.TestingUtil;
   import org.jboss.cache.pojo.test.Address;
  +import org.jboss.cache.pojo.test.Person;
   import org.jboss.cache.transaction.DummyTransactionManager;
  -import org.jboss.cache.lock.UpgradeException;
  -import org.jboss.cache.Fqn;
   
  -import javax.transaction.UserTransaction;
   import javax.naming.Context;
   import javax.naming.InitialContext;
  -import java.util.Properties;
  +import javax.transaction.UserTransaction;
   import java.util.ArrayList;
  +import java.util.Properties;
   import java.util.Random;
   
   /**
    * Local concurrent test for PojoCache. Test attach and detach under load
    * and concurrency.
    *
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    * @author<a href="mailto:bwang at jboss.org">Ben Wang</a> December 2004
    */
   public class LocalConcurrentTest extends TestCase
  @@ -103,10 +105,12 @@
         try
         {
            all();
  -      } catch (UpgradeException ue)
  +      }
  +      catch (UpgradeException ue)
         {
            log("Upgrade exception. Can ingore for repeatable read. " + ue);
  -      } catch (Exception ex)
  +      }
  +      catch (Exception ex)
         {
            log("Exception: " + ex);
            throw ex;
  
  
  



More information about the jboss-cvs-commits mailing list