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

Brian Stansberry brian.stansberry at jboss.com
Mon Jan 29 00:27:25 EST 2007


  User: bstansberry
  Date: 07/01/29 00:27:25

  Modified:    tests/functional/org/jboss/cache/eviction 
                        OptimisticEvictionTest.java
  Log:
  [JBCACHE-921] Test that "partially evicted" nodes eventually get fully removed
  
  Revision  Changes    Path
  1.11      +16 -0     JBossCache/tests/functional/org/jboss/cache/eviction/OptimisticEvictionTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticEvictionTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/OptimisticEvictionTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- OptimisticEvictionTest.java	11 Jan 2007 13:49:05 -0000	1.10
  +++ OptimisticEvictionTest.java	29 Jan 2007 05:27:25 -0000	1.11
  @@ -97,4 +97,20 @@
         assertTrue("Eviction interceptor should be in interceptor chain.", found);
      }
   
  +   public void testCompleteRemoval() throws Exception
  +   {
  +      String rootStr = "/timeBased/";
  +      
  +      // Add a parent, then a child. LRU will evict the parent, 
  +      // then the child, leaving behind an empty parent
  +      Fqn parent = Fqn.fromString(rootStr + "parent");
  +      cache.put(parent, "key", "value");
  +      cache.put(new Fqn(parent, "child"), "key", "value");
  +      
  +      // Give eviction time to run a few times, then confirm parent
  +      // is completely gone
  +      TestingUtil.sleepThread(5500);      
  +      assertFalse("Parent completely removed", cache.getRoot().hasChild(parent));            
  +   }
  +
   }
  
  
  



More information about the jboss-cvs-commits mailing list