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

Elias Ross genman at noderunner.net
Mon Nov 20 18:32:49 EST 2006


  User: genman  
  Date: 06/11/20 18:32:49

  Modified:    tests/functional/org/jboss/cache/eviction 
                        LRUAlgorithmTest.java
  Log:
  JBCACHE-867 - add undo method calls for remove, add more debugging
  
  Revision  Changes    Path
  1.8       +10 -2     JBossCache/tests/functional/org/jboss/cache/eviction/LRUAlgorithmTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LRUAlgorithmTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/LRUAlgorithmTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- LRUAlgorithmTest.java	14 Nov 2006 14:17:10 -0000	1.7
  +++ LRUAlgorithmTest.java	20 Nov 2006 23:32:49 -0000	1.8
  @@ -3,6 +3,9 @@
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  +
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.RegionManager;
   import org.jboss.cache.Region;
  @@ -19,6 +22,7 @@
      RegionManager regionManager_;
      LRUAlgorithm algo_;
      LRUConfiguration config_;
  +   Log log = LogFactory.getLog(LRUAlgorithm.class);
   
      public LRUAlgorithmTest(String s)
      {
  @@ -28,6 +32,9 @@
      public void setUp() throws Exception
      {
         super.setUp();
  +      log.debug("");
  +      log.debug("Test case " + getName());
  +      log.debug("");
   
         algo_ = new LRUAlgorithm();
         config_ = new LRUConfiguration();
  @@ -315,7 +322,7 @@
         TestingUtil.sleepThread(1000);
         algo_.process(region);
         assertEquals("Queue size #2: ", 3, algo_.getEvictionQueue().getNumberOfNodes());
  -      TestingUtil.sleepThread(1000);
  +      TestingUtil.sleepThread(1500);
         algo_.process(region);
         assertEquals("Queue size #3: ", 0, algo_.getEvictionQueue().getNumberOfNodes());
      }
  @@ -363,7 +370,7 @@
         }
         assertEquals("Queue size #2: ", 1, algo_.getEvictionQueue().getNumberOfNodes());
   
  -      TestingUtil.sleepThread(3000);
  +      TestingUtil.sleepThread(3500);
         // visit the node now to prevent the idle time from doing the pruning - node still gets pruned but by
         // max age.
         region.putNodeEvent(new EvictedEventNode(fqn3, NodeEventType.VISIT_NODE_EVENT));
  @@ -432,6 +439,7 @@
            e.printStackTrace();
         }
   
  +      TestingUtil.sleepThread(1000);
         assertEquals("Queue size #3: ", 0, algo_.getEvictionQueue().getNumberOfNodes());
      }
   
  
  
  



More information about the jboss-cvs-commits mailing list