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

Manik Surtani manik at jboss.org
Fri Jun 15 08:54:09 EDT 2007


  User: msurtani
  Date: 07/06/15 08:54:09

  Modified:    tests/functional/org/jboss/cache/passivation  
                        LocalPassivationIntegrationTest.java
                        BasicPassivationTest.java
  Log:
  Patched more tests to deal with async notifications
  
  Revision  Changes    Path
  1.18      +2 -0      JBossCache/tests/functional/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LocalPassivationIntegrationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- LocalPassivationIntegrationTest.java	30 May 2007 11:35:14 -0000	1.17
  +++ LocalPassivationIntegrationTest.java	15 Jun 2007 12:54:09 -0000	1.18
  @@ -29,6 +29,7 @@
      protected final static Log log = LogFactory.getLog(LocalPassivationIntegrationTest.class);
      int wakeupIntervalMillis_ = 0;
      PassivationListener listener_;
  +   private static final int LISTENER_WAIT_TIME = 200; // needed since notifications are delivered asynchronously
   
      public LocalPassivationIntegrationTest(String s)
      {
  @@ -84,6 +85,7 @@
         assertFalse("UnversionedNode should not exist", cache_.exists(str, str));
         String val = (String) cache_.get(str, str);
         assertNotNull("DataNode should be activated ", val);
  +      TestingUtil.sleepThread(LISTENER_WAIT_TIME);
         assertEquals("Eviction counter ", 1, listener_.getCounter());
      }
   
  
  
  
  1.18      +3 -2      JBossCache/tests/functional/org/jboss/cache/passivation/BasicPassivationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BasicPassivationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/BasicPassivationTest.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- BasicPassivationTest.java	30 May 2007 11:35:14 -0000	1.17
  +++ BasicPassivationTest.java	15 Jun 2007 12:54:09 -0000	1.18
  @@ -23,7 +23,7 @@
   
   /**
    * @author Ben Wang
  - * @version $Revision: 1.17 $
  + * @version $Revision: 1.18 $
    */
   public class BasicPassivationTest extends TestCase
   {
  @@ -36,6 +36,7 @@
      final String FQNSTR = "/org/jboss/3";
      int activationCount = 0;
      int passivationCount = 0;
  +   private static final int LISTENER_WAIT_TIME = 200; // needed since notifications are delivered asynchronously
   
      public BasicPassivationTest(String s)
      {
  @@ -102,7 +103,7 @@
            e.printStackTrace();
            fail("Failed to get" + e);
         }
  -
  +      TestingUtil.sleepThread(LISTENER_WAIT_TIME);
         assertEquals("activation count:", 1, activationCount);
         assertEquals("passivation count:", 1, passivationCount);
      }
  
  
  



More information about the jboss-cvs-commits mailing list