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

Brian Stansberry brian.stansberry at jboss.com
Fri May 11 23:53:53 EDT 2007


  User: bstansberry
  Date: 07/05/11 23:53:53

  Modified:    tests/functional/org/jboss/cache/pojo/jmx 
                        InterceptorRegistrationTest.java
  Log:
  Add tests of disabling plain cache registration
  
  Revision  Changes    Path
  1.2       +64 -0     JBossCache/tests/functional/org/jboss/cache/pojo/jmx/InterceptorRegistrationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InterceptorRegistrationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/jmx/InterceptorRegistrationTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- InterceptorRegistrationTest.java	11 May 2007 22:44:49 -0000	1.1
  +++ InterceptorRegistrationTest.java	12 May 2007 03:53:52 -0000	1.2
  @@ -28,7 +28,7 @@
    * Tests the interceptor registration function of CacheJmxWrapper.
    * 
    * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class InterceptorRegistrationTest extends PojoCacheJmxWrapperTestBase
   {
  @@ -396,6 +396,70 @@
         interceptorRegistrationTest(false);
      }
   
  +   /**
  +    * Tests that setting registerPlainCache=false disables interceptor 
  +    * registration when the wrapper is registered before create/start 
  +    * are called.
  +    * 
  +    * @throws Exception
  +    */
  +   public void testRegisterPlainCache1() throws Exception
  +   {
  +      PojoCacheJmxWrapper wrapper = createWrapper(createConfiguration());
  +      wrapper.setRegisterPlainCache(false);
  +      wrapper.setRegisterInterceptors(true);
  +      
  +      registerWrapper(wrapper);
  +      
  +      assertTrue("Should be registered", mBeanServer.isRegistered(mBeanName));
  +      
  +      wrapper.create();
  +      wrapper.start();
  +      
  +      interceptorRegistrationTest(false);
  +      
  +      wrapper.stop();
  +      wrapper.destroy();
  +      
  +      interceptorRegistrationTest(false);
  +      
  +      unregisterWrapper();
  +      
  +      interceptorRegistrationTest(false);
  +   }
  +
  +   /**
  +    * Tests that setting registerPlainCache=false disables interceptor 
  +    * registration when the wrapper is registered after create/start 
  +    * are called.
  +    * 
  +    * @throws Exception
  +    */
  +   public void testRegisterPlainCache2() throws Exception
  +   {
  +      PojoCacheJmxWrapper wrapper = createWrapper(createConfiguration());
  +      wrapper.setRegisterPlainCache(false);
  +      wrapper.setRegisterInterceptors(true);
  +      
  +      wrapper.create();
  +      wrapper.start();
  +      
  +      registerWrapper(wrapper);
  +      
  +      assertTrue("Should be registered", mBeanServer.isRegistered(mBeanName));
  +      
  +      interceptorRegistrationTest(false);
  +      
  +      wrapper.stop();
  +      wrapper.destroy();
  +      
  +      interceptorRegistrationTest(false);
  +      
  +      unregisterWrapper();
  +      
  +      interceptorRegistrationTest(false);
  +   }
  +
      public void testExposeManagementStatistics1() throws Exception
      {
         Configuration cfg = createConfiguration();
  
  
  



More information about the jboss-cvs-commits mailing list