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

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


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

  Modified:    tests/functional/org/jboss/cache/pojo/integrated    
                        ReplicatedPropagationManagerlTest.java
                        ReplicatedNetworkManagementTest.java
                        PropagationManagerlTest.java
                        NetworkManagementTest.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       +19 -11    JBossCache/tests/functional/org/jboss/cache/pojo/integrated/ReplicatedPropagationManagerlTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedPropagationManagerlTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/integrated/ReplicatedPropagationManagerlTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- ReplicatedPropagationManagerlTest.java	16 Apr 2007 17:37:11 -0000	1.2
  +++ ReplicatedPropagationManagerlTest.java	23 May 2007 10:28:51 -0000	1.3
  @@ -1,39 +1,43 @@
   package org.jboss.cache.pojo.integrated;
   
   import junit.framework.TestCase;
  -
  +import org.jboss.cache.Fqn;
   import org.jboss.cache.config.Configuration.CacheMode;
   import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
   import org.jboss.cache.pojo.PojoCache;
   import org.jboss.cache.pojo.PojoCacheFactory;
   import org.jboss.cache.pojo.test.propagation.PropagationManager;
   import org.jboss.cache.pojo.test.propagation.impl.PropagationManagerImpl;
  -import org.jboss.cache.Fqn;
   
  -public class ReplicatedPropagationManagerlTest extends TestCase {
  +public class ReplicatedPropagationManagerlTest extends TestCase
  +{
      private PropagationManager pm_;
      private PojoCache cache1_;
      private PojoCache cache2_;
   
  -   protected void setUp() throws Exception {
  +   protected void setUp() throws Exception
  +   {
         cache1_ = createCache("TestCluster");
         cache2_ = createCache("TestCluster");
      }
   
  -   protected void tearDown() throws Exception {
  +   protected void tearDown() throws Exception
  +   {
         cache1_.getCache().removeNode(Fqn.fromString("/"));
         cache1_.stop();
         cache2_.stop();
      }
   
  -   private PojoCache createCache(String name) throws Exception {
  +   private PojoCache createCache(String name) throws Exception
  +   {
         boolean toStart = false;
         PojoCache cache = PojoCacheFactory.createCache(UnitTestCacheConfigurationFactory.createConfiguration(CacheMode.REPL_SYNC), toStart);
         cache.start();
         return cache;
      }
   
  -   protected void initSimplifiedPm() {
  +   protected void initSimplifiedPm()
  +   {
         pm_ = new PropagationManagerImpl();
   
         pm_.setRootNode("root");
  @@ -60,7 +64,8 @@
   */
      }
   
  -   public void testSimplified() throws Exception {
  +   public void testSimplified() throws Exception
  +   {
         initSimplifiedPm();
   
         // Put pm into cache management first
  @@ -89,7 +94,8 @@
         */
      }
   
  -   protected void initPm() {
  +   protected void initPm()
  +   {
         pm_ = new PropagationManagerImpl();
   
         pm_.setRootNode("root");
  @@ -109,7 +115,8 @@
         pm_.addStateItem("root.kanto.kanagawa.kawasaki", 1007, 1030);
      }
   
  -   public void testPropagation() throws Exception {
  +   public void testPropagation() throws Exception
  +   {
         initPm();
         // Put pm into cache management first
         cache1_.attach("/propagation", pm_);
  @@ -161,7 +168,8 @@
         System.out.println("---------------------------------------------");
      }
   
  -   public static void main(String[] args) throws Exception {
  +   public static void main(String[] args) throws Exception
  +   {
         ReplicatedPropagationManagerlTest pmTest = new ReplicatedPropagationManagerlTest();
         pmTest.setUp();
         pmTest.testPropagation();
  
  
  
  1.3       +1 -1      JBossCache/tests/functional/org/jboss/cache/pojo/integrated/ReplicatedNetworkManagementTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedNetworkManagementTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/integrated/ReplicatedNetworkManagementTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- ReplicatedNetworkManagementTest.java	16 Apr 2007 17:37:11 -0000	1.2
  +++ ReplicatedNetworkManagementTest.java	23 May 2007 10:28:51 -0000	1.3
  @@ -5,6 +5,7 @@
   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.PojoCache;
  @@ -13,7 +14,6 @@
   import org.jboss.cache.pojo.test.NetworkDomain;
   import org.jboss.cache.pojo.test.NetworkElement;
   import org.jboss.cache.pojo.test.NetworkNode;
  -import org.jboss.cache.Fqn;
   
   import java.util.List;
   
  
  
  
  1.3       +1 -2      JBossCache/tests/functional/org/jboss/cache/pojo/integrated/PropagationManagerlTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PropagationManagerlTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/integrated/PropagationManagerlTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- PropagationManagerlTest.java	16 Apr 2007 17:37:11 -0000	1.2
  +++ PropagationManagerlTest.java	23 May 2007 10:28:51 -0000	1.3
  @@ -1,14 +1,13 @@
   package org.jboss.cache.pojo.integrated;
   
   import junit.framework.TestCase;
  -
  +import org.jboss.cache.Fqn;
   import org.jboss.cache.config.Configuration.CacheMode;
   import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
   import org.jboss.cache.pojo.PojoCache;
   import org.jboss.cache.pojo.PojoCacheFactory;
   import org.jboss.cache.pojo.test.propagation.PropagationManager;
   import org.jboss.cache.pojo.test.propagation.impl.PropagationManagerImpl;
  -import org.jboss.cache.Fqn;
   
   public class PropagationManagerlTest extends TestCase
   {
  
  
  
  1.3       +1 -1      JBossCache/tests/functional/org/jboss/cache/pojo/integrated/NetworkManagementTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NetworkManagementTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/integrated/NetworkManagementTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- NetworkManagementTest.java	16 Apr 2007 17:37:11 -0000	1.2
  +++ NetworkManagementTest.java	23 May 2007 10:28:51 -0000	1.3
  @@ -5,6 +5,7 @@
   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.PojoCache;
  @@ -13,7 +14,6 @@
   import org.jboss.cache.pojo.test.NetworkDomain;
   import org.jboss.cache.pojo.test.NetworkElement;
   import org.jboss.cache.pojo.test.NetworkNode;
  -import org.jboss.cache.Fqn;
   
   import java.util.List;
   
  
  
  



More information about the jboss-cvs-commits mailing list