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

Manik Surtani msurtani at jboss.com
Tue Jan 30 21:40:23 EST 2007


  User: msurtani
  Date: 07/01/30 21:40:23

  Modified:    tests/functional/org/jboss/cache/api  NodeMoveAPITest.java
  Log:
  Removed dependency on concurrent.jar
  
  Revision  Changes    Path
  1.22      +4 -4      JBossCache/tests/functional/org/jboss/cache/api/NodeMoveAPITest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeMoveAPITest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/NodeMoveAPITest.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- NodeMoveAPITest.java	17 Jan 2007 16:24:07 -0000	1.21
  +++ NodeMoveAPITest.java	31 Jan 2007 02:40:23 -0000	1.22
  @@ -1,6 +1,5 @@
   package org.jboss.cache.api;
   
  -import EDU.oswego.cs.dl.util.concurrent.Latch;
   import org.jboss.cache.CacheImpl;
   import org.jboss.cache.DefaultCacheFactory;
   import org.jboss.cache.Fqn;
  @@ -13,6 +12,7 @@
   
   import javax.transaction.TransactionManager;
   import java.util.Random;
  +import java.util.concurrent.CountDownLatch;
   
   /**
    * Excercises and tests the new move() api
  @@ -471,7 +471,7 @@
         final Node NODE_Y = NODES[1].addChild(FQN_Y);
   
         Thread[] movers = new Thread[N];
  -      final Latch latch = new Latch();
  +      final CountDownLatch latch = new CountDownLatch(1);
         final Random r = new Random();
   
         for (int i = 0; i < N; i++)
  @@ -482,7 +482,7 @@
               {
                  try
                  {
  -                  latch.acquire();
  +                  latch.await();
                  }
                  catch (InterruptedException e)
                  {
  @@ -516,7 +516,7 @@
            movers[i].start();
         }
   
  -      latch.release();
  +      latch.countDown();
   
         for (Thread t : movers)
         {
  
  
  



More information about the jboss-cvs-commits mailing list