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

Manik Surtani msurtani at jboss.com
Wed Nov 8 11:44:18 EST 2006


  User: msurtani
  Date: 06/11/08 11:44:18

  Modified:    tests/functional/org/jboss/cache/buddyreplication   Tag:
                        Branch_JBossCache_1_4_0
                        BuddyGroupAssignmentTest.java
                        BuddyReplicationTestsBase.java
  Log:
  Rolled back potential fix for JBCACHE-814
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.1   +102 -122  JBossCache/tests/functional/org/jboss/cache/buddyreplication/BuddyGroupAssignmentTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BuddyGroupAssignmentTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/buddyreplication/BuddyGroupAssignmentTest.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -b -r1.9 -r1.9.2.1
  --- BuddyGroupAssignmentTest.java	26 May 2006 12:58:57 -0000	1.9
  +++ BuddyGroupAssignmentTest.java	8 Nov 2006 16:44:18 -0000	1.9.2.1
  @@ -16,18 +16,24 @@
    */
   public class BuddyGroupAssignmentTest extends BuddyReplicationTestsBase
   {
  +   private TreeCache[] caches;
  +
  +   protected void tearDown() throws Exception
  +   {
  +      System.out.println("*** In tearDown()");
  +      cleanup(caches);
  +   }
  +
   
       public void testSingleBuddy() throws Exception
       {
  -        TreeCache[] caches = createCaches(3, false);
  +      caches = createCaches(3, false);
   
  -        for (int i=0; i<caches.length; i++)
  +      for (int i = 0; i < caches.length; i++)
           {
               printBuddyGroup(caches[i]);
           }
   
  -        try
  -        {
               System.out.println("*** Testing cache 0:");
               assertIsBuddy(caches[0], caches[1], true);
               System.out.println("*** Testing cache 1:");
  @@ -35,18 +41,11 @@
               System.out.println("*** Testing cache 2:");
               assertIsBuddy(caches[2], caches[0], true);
           }
  -        finally
  -        {
  -            cleanup(caches);
  -        }
  -    }
   
       public void test2Buddies() throws Exception
       {
  -        TreeCache[] caches = createCaches(2, 3, false);
  +      caches = createCaches(2, 3, false);
   
  -        try
  -        {
               System.out.println("*** Testing cache 0");
               assertIsBuddy(caches[0], caches[1], false);
               assertIsBuddy(caches[0], caches[2], false);
  @@ -57,18 +56,11 @@
               assertIsBuddy(caches[2], caches[1], false);
               assertIsBuddy(caches[2], caches[0], false);
           }
  -        finally
  -        {
  -            cleanup(caches);
  -        }
  -    }
   
       public void testRemovalFromClusterSingleBuddy() throws Exception
       {
  -        TreeCache[] caches = createCaches(3, false);
  +      caches = createCaches(3, false);
   
  -        try
  -        {
               System.out.println("*** Testing cache 0");
               assertIsBuddy(caches[0], caches[1], true);
               System.out.println("*** Testing cache 1");
  @@ -90,19 +82,12 @@
               System.out.println("*** Completed successfully ***");
               assertNoLocks(caches);
           }
  -        finally
  -        {
  -            cleanup(caches);
  -        }
  -    }
   
       public void testRemovalFromCluster2Buddies() throws Exception
       {
  -        TreeCache[] caches = createCaches(2, 4, false);
  +      caches = createCaches(2, 4, false);
           assertNoLocks(caches);
   
  -        try
  -        {
               System.out.println("*** Testing cache 0");
               assertIsBuddy(caches[0], caches[1], false);
               assertIsBuddy(caches[0], caches[2], false);
  @@ -134,9 +119,4 @@
               assertIsBuddy(caches[3], caches[2], false);
               assertNoLocks(caches);
           }
  -        finally
  -        {
  -            cleanup(caches);
  -        }
  -    }
   }
  
  
  
  1.26.2.4  +12 -8     JBossCache/tests/functional/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BuddyReplicationTestsBase.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java,v
  retrieving revision 1.26.2.3
  retrieving revision 1.26.2.4
  diff -u -b -r1.26.2.3 -r1.26.2.4
  --- BuddyReplicationTestsBase.java	4 Nov 2006 04:15:14 -0000	1.26.2.3
  +++ BuddyReplicationTestsBase.java	8 Nov 2006 16:44:18 -0000	1.26.2.4
  @@ -78,7 +78,7 @@
   
         // Call the hook that allows mux integration if that's what the test wants
         configureMultiplexer(c);
  -      
  +      c.createService();
         if (start)
         {
            c.startService();
  @@ -93,7 +93,7 @@
       * Provides a hook for multiplexer integration. This default implementation
       * is a no-op; subclasses that test mux integration would override
       * to integrate the given cache with a multiplexer.
  -    *
  +    * <p/>
       * param cache a cache that has been configured but not yet created.
       */
      protected void configureMultiplexer(TreeCacheMBean cache) throws Exception
  @@ -190,9 +190,13 @@
         System.out.println("Creating " + numCaches + " caches");
         for (int i = 0; i < numCaches; i++)
         {
  -         caches[i] = createCache(optimisticLocks, numBuddies, useBuddyPool ? Character.toString((char) ('A' + i)) : null, useDataGravitation, true);
  +         caches[i] = createCache(optimisticLocks, numBuddies, useBuddyPool ? Character.toString((char) ('A' + i)) : null, useDataGravitation, false);
  +
  +         caches[i].createService();
         }
   
  +      for (int i = 0; i < numCaches; i++) caches[i].startService();
  +
         System.out.println("Blocking until all views recvd");
         // allow some time for the caches to start up and discover each other
         TestingUtil.blockUntilViewsReceived(caches, VIEW_BLOCK_TIMEOUT);
  
  
  



More information about the jboss-cvs-commits mailing list