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

Manik Surtani msurtani at jboss.com
Wed Dec 13 08:32:45 EST 2006


  User: msurtani
  Date: 06/12/13 08:32:45

  Modified:    tests/functional/org/jboss/cache/aop  Tag:
                        Branch_JBossCache_1_4_0 LocalConcurrentTest.java
  Log:
  recycle queue should use the same capacity as the eviction queue - NOT the default 1024
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.1   +6 -2      JBossCache/tests/functional/org/jboss/cache/aop/Attic/LocalConcurrentTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LocalConcurrentTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/Attic/LocalConcurrentTest.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -b -r1.8 -r1.8.2.1
  --- LocalConcurrentTest.java	1 Jun 2006 02:14:23 -0000	1.8
  +++ LocalConcurrentTest.java	13 Dec 2006 13:32:45 -0000	1.8.2.1
  @@ -34,7 +34,7 @@
    * Local mode stress test for PojoCache. Test getObject and putObject under load
    * and concurrency.
    *
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.8.2.1 $
    * @author<a href="mailto:bwang at jboss.org">Ben Wang</a> December 2004
    */
   public class LocalConcurrentTest extends TestCase
  @@ -205,6 +205,10 @@
         }
   
         /**
  +       * Note that this operation needs to run under transaction context as a whole. If not, then different
  +       * threads will have the chance to use the same fqn node. While one thread has finished putObject and the
  +       * other thread can the do the same, it will screw up the reference counting (??).
  +       * @throws Exception
          */
         public void _run() throws Exception {
            for (int loop = 0; loop < MAX_LOOP; loop++) {
  @@ -223,7 +227,7 @@
         private void op1() throws CacheException {
            int i = random_.nextInt(nodeList_.size() - 1);
            if(i==0) return; // it is meaningless to test root
  -         String node = (String) nodeList_.get(i) + "/aop";
  +         String node = nodeList_.get(i) + "/aop";
            cache_.putObject(node, person_);
            TestingUtil.sleepThread(random_.nextInt(SLEEP_TIME)); // sleep for max 200 millis
   // getObject is not thread safe since there is no way to lock the fqn atomically without triggering
  
  
  



More information about the jboss-cvs-commits mailing list