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

Brian Stansberry brian.stansberry at jboss.com
Tue Jan 2 23:03:48 EST 2007


  User: bstansberry
  Date: 07/01/02 23:03:48

  Modified:    tests/functional/org/jboss/cache/statetransfer 
                        StateTransferTestBase.java
  Log:
  [JBCACHE-920] Port multiplexer integration tests to HEAD
  
  Revision  Changes    Path
  1.31      +29 -0     JBossCache/tests/functional/org/jboss/cache/statetransfer/StateTransferTestBase.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: StateTransferTestBase.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/statetransfer/StateTransferTestBase.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -b -r1.30 -r1.31
  --- StateTransferTestBase.java	2 Jan 2007 18:26:07 -0000	1.30
  +++ StateTransferTestBase.java	3 Jan 2007 04:03:48 -0000	1.31
  @@ -119,6 +119,9 @@
         }
   //      tree.setConfiguration(c);
         CacheSPI tree = (CacheSPI) DefaultCacheFactory.getInstance().createCache(c, false);
  +      
  +      configureMultiplexer(tree);
  +      
         // Put the cache in the map before starting, so if it fails in
         // start it can still be destroyed later
         caches.put(cacheID, tree);
  @@ -132,10 +135,36 @@
         return tree;
      }
   
  +   /**
  +    * 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.
  +    *
  +    * param cache a cache that has been configured but not yet created.
  +    */
  +   protected void configureMultiplexer(Cache cache) throws Exception
  +   {
  +      // default does nothing
  +   }
  +   
  +   /**
  +    * Provides a hook to check that the cache's channel came from the
  +    * multiplexer, or not, as expected.  This default impl asserts that
  +    * the channel did not come from the multiplexer.
  +    * 
  +    * @param cache a cache that has already been started
  +    */
  +   protected void validateMultiplexer(Cache cache)
  +   {
  +      assertFalse("Cache is not using multiplexer", cache.getConfiguration().isUsingMultiplexer());
  +   }
  +
      protected void startCache(Cache cache) throws Exception
      {
         cache.create();
         cache.start();
  +      
  +      validateMultiplexer(cache);
      }
   
      protected void configureCacheLoader(Configuration c,
  
  
  



More information about the jboss-cvs-commits mailing list