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

Manik Surtani msurtani at jboss.com
Thu Jan 11 08:49:23 EST 2007


  User: msurtani
  Date: 07/01/11 08:49:23

  Modified:    tests/functional/org/jboss/cache/invalidation 
                        InvalidationInterceptorTest.java
  Log:
  Changed CacheImpl ctor to be protected, and changed cache factories accordingly
  
  Revision  Changes    Path
  1.20      +5 -4      JBossCache/tests/functional/org/jboss/cache/invalidation/InvalidationInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InvalidationInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/invalidation/InvalidationInterceptorTest.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- InvalidationInterceptorTest.java	30 Dec 2006 17:50:05 -0000	1.19
  +++ InvalidationInterceptorTest.java	11 Jan 2007 13:49:23 -0000	1.20
  @@ -14,6 +14,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.CacheImpl;
  +import org.jboss.cache.DefaultCacheFactory;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.config.CacheLoaderConfig;
   import org.jboss.cache.config.Configuration;
  @@ -112,7 +113,7 @@
   
         Fqn fqn = Fqn.fromString("/a/b");
         cache1.put(fqn, "key", "value");
  -      TestingUtil.sleepThread(500);  // give it time to broadcast the evict call
  +      TestingUtil.sleepThread(500);// give it time to broadcast the evict call
         // test that this has NOT replicated, but rather has been invalidated:
         Assert.assertEquals("value", cache1.get(fqn, "key"));
         Assert.assertNull("Should NOT have replicated!", cache2.get(fqn));
  @@ -121,14 +122,14 @@
   
         // now make sure cache2 is in sync with cache1:
         cache2.put(fqn, "key", "value");
  -      TestingUtil.sleepThread(500);  // give it time to broadcast the evict call
  +      TestingUtil.sleepThread(500);// give it time to broadcast the evict call
         Assert.assertNull("Should be null", cache1.get(fqn));
         Assert.assertEquals("value", cache2.get(fqn, "key"));
   
         // now test the invalidation:
         cache1.put(fqn, "key2", "value2");
         Assert.assertEquals("value2", cache1.get(fqn, "key2"));
  -      TestingUtil.sleepThread(500);  // give it time to broadcast the evict call
  +      TestingUtil.sleepThread(500);// give it time to broadcast the evict call
         Assert.assertNull("Should have been invalidated!", cache2.get(fqn));
   
         // clean up.
  @@ -576,7 +577,7 @@
   
      protected CacheImpl createUnstartedCache(boolean optimistic) throws Exception
      {
  -      CacheImpl cache = new CacheImpl();
  +      CacheImpl cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
         cache.getConfiguration().setClusterName("MyCluster");
         cache.getConfiguration().setInitialStateRetrievalTimeout(3000);
         cache.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_SYNC);
  
  
  



More information about the jboss-cvs-commits mailing list