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

Manik Surtani msurtani at jboss.com
Wed Sep 6 11:30:56 EDT 2006


  User: msurtani
  Date: 06/09/06 11:30:56

  Modified:    tests/functional/org/jboss/cache/aop/integrated    
                        NetworkManagementAopTest.java
                        PropagationManagerlAopTest.java
                        ReplicatedNetworkManagementAopTest.java
                        ReplicatedPropagationManagerlAopTest.java
  Log:
  Removed TreeCache dependency on ServiceMBeanSupport
  
  Revision  Changes    Path
  1.9       +27 -15    JBossCache/tests/functional/org/jboss/cache/aop/integrated/NetworkManagementAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NetworkManagementAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/integrated/NetworkManagementAopTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- NetworkManagementAopTest.java	25 Aug 2006 14:10:09 -0000	1.8
  +++ NetworkManagementAopTest.java	6 Sep 2006 15:30:56 -0000	1.9
  @@ -27,41 +27,47 @@
    * @author Ben Wang
    */
   
  -public class NetworkManagementAopTest extends TestCase {
  +public class NetworkManagementAopTest extends TestCase
  +{
      Log log = LogFactory.getLog(NetworkManagementAopTest.class);
      PojoCache cache1;
   
  -   public NetworkManagementAopTest(String name) {
  +   public NetworkManagementAopTest(String name)
  +   {
         super(name);
      }
   
  -   protected void setUp() throws Exception {
  +   protected void setUp() throws Exception
  +   {
         super.setUp();
         log.info("setUp() ....");
         cache1 = createCache("CacheGroup");
      }
   
  -   protected void tearDown() throws Exception {
  +   protected void tearDown() throws Exception
  +   {
         super.tearDown();
         cache1.remove("/");
         cache1.stop();
      }
   
  -   private PojoCache createCache(String name) throws Exception {
  +   private PojoCache createCache(String name) throws Exception
  +   {
         PojoCache tree = new PojoCache();
         XmlConfigurationParser parser = new XmlConfigurationParser();
         Configuration c = parser.parseFile("META-INF/replSync-service.xml"); // read in generic replAsync xml
         tree.setConfiguration(c); 
         c.setClusterName(name);
  -      tree.createService();
  -      tree.startService();
  +      tree.create();
  +      tree.start();
         return tree;
      }
   
      /**
       * Domain shares Admin object.
       */
  -   public void testDomainAndAdmin() throws Exception {
  +   public void testDomainAndAdmin() throws Exception
  +   {
         NetworkAdmin admin = new NetworkAdmin();
         admin.setId("Benny");
   
  @@ -97,7 +103,8 @@
      /**
       * Domain shares Admin object, domain also contains a list of Nodes, and each DataNode has sensor elements
       */
  -   public void testNodeAndElement() throws Exception {
  +   public void testNodeAndElement() throws Exception
  +   {
         // Construct nodes
         NetworkNode taipei = new NetworkNode();
         taipei.setName("Taipei machine");
  @@ -154,7 +161,8 @@
      /**
       * Domain shares Admin object, domain also contains a list of Nodes, and each DataNode has sensor elements
       */
  -   public void testSharedNodeAndElement() throws Exception {
  +   public void testSharedNodeAndElement() throws Exception
  +   {
         // Construct nodes
         NetworkNode taipei = new NetworkNode();
         taipei.setName("Taipei machine");
  @@ -213,7 +221,8 @@
      /**
       * Domain shares Admin object, domain also contains a list of Nodes, and each DataNode has sensor elements
       */
  -   public void testRecursive() throws Exception {
  +   public void testRecursive() throws Exception
  +   {
         NetworkAdmin admin = new NetworkAdmin();
         admin.setId("Benny");
   
  @@ -272,7 +281,8 @@
      /**
       * Domain shares Admin object, domain also contains a list of Nodes, and each DataNode has sensor elements
       */
  -   public void testAll() throws Exception {
  +   public void testAll() throws Exception
  +   {
         // Construct domains
         NetworkDomain tempSensorDomain = new NetworkDomain();
         tempSensorDomain.setName("Temperature sensors");
  @@ -354,11 +364,13 @@
         assertEquals("Status ", tempSensor1.getStatus(), tempSens1.getStatus());
      }
   
  -   public static Test suite() throws Exception {
  +   public static Test suite() throws Exception
  +   {
         return new TestSuite(NetworkManagementAopTest.class);
      }
   
  -   public static void main(String[] args) throws Exception {
  +   public static void main(String[] args) throws Exception
  +   {
         junit.textui.TestRunner.run(suite());
      }
   
  
  
  
  1.4       +20 -11    JBossCache/tests/functional/org/jboss/cache/aop/integrated/PropagationManagerlAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PropagationManagerlAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/integrated/PropagationManagerlAopTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- PropagationManagerlAopTest.java	20 Jul 2006 09:03:52 -0000	1.3
  +++ PropagationManagerlAopTest.java	6 Sep 2006 15:30:56 -0000	1.4
  @@ -6,29 +6,34 @@
   import org.jboss.cache.aop.test.propagation.impl.PropagationManagerImpl;
   import org.jboss.cache.factories.XmlConfigurationParser;
   
  -public class PropagationManagerlAopTest extends TestCase {
  +public class PropagationManagerlAopTest extends TestCase
  +{
      private PropagationManager pm_;
      private PojoCache cache_;
   
  -   protected void setUp() throws Exception {
  +   protected void setUp() throws Exception
  +   {
         cache_ = createCache("TestCluster");
      }
   
  -   protected void tearDown() throws Exception {
  +   protected void tearDown() throws Exception
  +   {
         cache_.remove("/");
         cache_.stop();
      }
   
  -   private PojoCache createCache(String name) throws Exception {
  +   private PojoCache createCache(String name) throws Exception
  +   {
         PojoCache tree = new PojoCache();
         tree.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/local-service.xml"));
         tree.getConfiguration().setClusterName(name);
  -      tree.createService();
  -      tree.startService();
  +      tree.create();
  +      tree.start();
         return tree;
      }
   
  -   protected void initSimplifiedPm() {
  +   protected void initSimplifiedPm()
  +   {
         pm_ = new PropagationManagerImpl();
   
         pm_.setRootNode("root");
  @@ -55,7 +60,8 @@
   */
      }
   
  -   public void testSimplified() throws Exception {
  +   public void testSimplified() throws Exception
  +   {
         initSimplifiedPm();
   
         // Put pm into cache management first
  @@ -82,7 +88,8 @@
         */
      }
   
  -   protected void initPm() {
  +   protected void initPm()
  +   {
         pm_ = new PropagationManagerImpl();
   
         pm_.setRootNode("root");
  @@ -102,7 +109,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
         cache_.putObject("/propagation", pm_);
  @@ -153,7 +161,8 @@
         System.out.println("---------------------------------------------");
      }
   
  -   public static void main(String[] args) throws Exception {
  +   public static void main(String[] args) throws Exception
  +   {
         PropagationManagerlAopTest pmTest = new PropagationManagerlAopTest();
         pmTest.setUp();
         pmTest.testPropagation();
  
  
  
  1.9       +24 -14    JBossCache/tests/functional/org/jboss/cache/aop/integrated/ReplicatedNetworkManagementAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedNetworkManagementAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/integrated/ReplicatedNetworkManagementAopTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- ReplicatedNetworkManagementAopTest.java	25 Aug 2006 14:10:09 -0000	1.8
  +++ ReplicatedNetworkManagementAopTest.java	6 Sep 2006 15:30:56 -0000	1.9
  @@ -26,30 +26,35 @@
    * @author Ben Wang
    */
   
  -public class ReplicatedNetworkManagementAopTest extends TestCase {
  +public class ReplicatedNetworkManagementAopTest extends TestCase
  +{
      Log log = LogFactory.getLog(ReplicatedNetworkManagementAopTest.class);
      PojoCache cache1;
      PojoCache cache2;
   
  -   public ReplicatedNetworkManagementAopTest(String name) {
  +   public ReplicatedNetworkManagementAopTest(String name)
  +   {
         super(name);
      }
   
  -   protected void setUp() throws Exception {
  +   protected void setUp() throws Exception
  +   {
         super.setUp();
         log.info("setUp() ....");
         cache1 = createCache("CacheGroup");
         cache2 = createCache("CacheGroup");
      }
   
  -   protected void tearDown() throws Exception {
  +   protected void tearDown() throws Exception
  +   {
         super.tearDown();
         cache1.remove("/");
         cache1.stop();
         cache2.stop();
      }
   
  -   private PojoCache createCache(String name) throws Exception {
  +   private PojoCache createCache(String name) throws Exception
  +   {
         PojoCache tree = new PojoCache();
         //PropertyConfigurator config = new PropertyConfigurator();
         //config.configure(tree, "META-INF/replSync-service.xml"); // read in generic replAsync xml
  @@ -58,15 +63,16 @@
          Configuration conf = new Configuration();
   
         conf.setClusterName(name);
  -      tree.createService();
  -      tree.startService();
  +      tree.create();
  +      tree.start();
         return tree;
      }
   
      /**
       * Domain shares Admin object.
       */
  -   public void testDomainAndAdmin() throws Exception {
  +   public void testDomainAndAdmin() throws Exception
  +   {
         NetworkAdmin admin = new NetworkAdmin();
         admin.setId("Benny");
   
  @@ -110,7 +116,8 @@
      /**
       * Domain shares Admin object, domain also contains a list of Nodes, and each DataNode has sensor elements
       */
  -   public void testNodeAndElement() throws Exception {
  +   public void testNodeAndElement() throws Exception
  +   {
         // Construct nodes
         NetworkNode taipei = new NetworkNode();
         taipei.setName("Taipei machine");
  @@ -170,7 +177,8 @@
      /**
       * Domain shares Admin object, domain also contains a list of Nodes, and each DataNode has sensor elements
       */
  -   public void testAll() throws Exception {
  +   public void testAll() throws Exception
  +   {
         NetworkAdmin admin = new NetworkAdmin();
         admin.setId("Benny");
   
  @@ -256,11 +264,13 @@
         assertEquals("Status ", tempSensor1.getStatus(), tempSens1.getStatus());
      }
   
  -   public static Test suite() throws Exception {
  +   public static Test suite() throws Exception
  +   {
         return new TestSuite(ReplicatedNetworkManagementAopTest.class);
      }
   
  -   public static void main(String[] args) throws Exception {
  +   public static void main(String[] args) throws Exception
  +   {
         junit.textui.TestRunner.run(suite());
      }
   
  
  
  
  1.5       +20 -11    JBossCache/tests/functional/org/jboss/cache/aop/integrated/ReplicatedPropagationManagerlAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ReplicatedPropagationManagerlAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/integrated/ReplicatedPropagationManagerlAopTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- ReplicatedPropagationManagerlAopTest.java	20 Jul 2006 11:14:16 -0000	1.4
  +++ ReplicatedPropagationManagerlAopTest.java	6 Sep 2006 15:30:56 -0000	1.5
  @@ -6,32 +6,37 @@
   import org.jboss.cache.aop.test.propagation.impl.PropagationManagerImpl;
   import org.jboss.cache.factories.XmlConfigurationParser;
   
  -public class ReplicatedPropagationManagerlAopTest extends TestCase {
  +public class ReplicatedPropagationManagerlAopTest 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_.remove("/");
         cache1_.stop();
         cache2_.stop();
      }
   
  -   private PojoCache createCache(String name) throws Exception {
  +   private PojoCache createCache(String name) throws Exception
  +   {
         PojoCache tree = new PojoCache();
         tree.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
         tree.getConfiguration().setClusterName(name);
  -      tree.createService();
  -      tree.startService();
  +      tree.create();
  +      tree.start();
         return tree;
      }
   
  -   protected void initSimplifiedPm() {
  +   protected void initSimplifiedPm()
  +   {
         pm_ = new PropagationManagerImpl();
   
         pm_.setRootNode("root");
  @@ -58,7 +63,8 @@
   */
      }
   
  -   public void testSimplified() throws Exception {
  +   public void testSimplified() throws Exception
  +   {
         initSimplifiedPm();
   
         // Put pm into cache management first
  @@ -88,7 +94,8 @@
         */
      }
   
  -   protected void initPm() {
  +   protected void initPm()
  +   {
         pm_ = new PropagationManagerImpl();
   
         pm_.setRootNode("root");
  @@ -108,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_.putObject("/propagation", pm_);
  @@ -162,7 +170,8 @@
         System.out.println("---------------------------------------------");
      }
   
  -   public static void main(String[] args) throws Exception {
  +   public static void main(String[] args) throws Exception
  +   {
         ReplicatedPropagationManagerlAopTest pmTest = new ReplicatedPropagationManagerlAopTest();
         pmTest.setUp();
         pmTest.testPropagation();
  
  
  



More information about the jboss-cvs-commits mailing list