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

Elias Ross genman at noderunner.net
Wed May 9 04:06:31 EDT 2007


  User: genman  
  Date: 07/05/09 04:06:31

  Modified:    tests/functional/org/jboss/cache/eviction 
                        ExpirationPolicyTest.java
  Log:
  JBCACHE-1051
  
  Revision  Changes    Path
  1.10      +16 -1     JBossCache/tests/functional/org/jboss/cache/eviction/ExpirationPolicyTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ExpirationPolicyTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ExpirationPolicyTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- ExpirationPolicyTest.java	24 Jan 2007 16:33:58 -0000	1.9
  +++ ExpirationPolicyTest.java	9 May 2007 08:06:31 -0000	1.10
  @@ -21,7 +21,7 @@
    * Unit tests for {@link ExpirationPolicy}.
    *
    * @author Elias Ross
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
    */
   public class ExpirationPolicyTest extends TestCase
   {
  @@ -89,6 +89,21 @@
   
      }
   
  +   public void testUpdateToFuture() throws Exception
  +   {
  +      log.info("update 1 from future to past");
  +      Long future2 = future + 2000;
  +      cache.put(fqn1, ExpirationConfiguration.EXPIRATION_KEY, future);
  +      TestingUtil.sleepThread(2000);
  +      assertNotNull(cache.get(fqn1));
  +      cache.put(fqn1, ExpirationConfiguration.EXPIRATION_KEY, future2);
  +      TestingUtil.sleepThread(3000);
  +      assertNotNull(cache.get(fqn1));
  +      TestingUtil.sleepThread(3000);
  +      assertNull(cache.get(fqn1));
  +      cache.remove(Fqn.ROOT);
  +   }
  +
      public void testMaxNodes() throws Exception
      {
         log.info("set max nodes to 2, expire soonest to expire first");
  
  
  



More information about the jboss-cvs-commits mailing list