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

Manik Surtani msurtani at jboss.com
Thu Jan 4 00:35:41 EST 2007


  User: msurtani
  Date: 07/01/04 00:35:41

  Modified:    tests/functional/org/jboss/cache/transaction 
                        TransactionTest.java
  Log:
  Major changes around nodes, and the way they interact with the interceptor stack.
  Also removed redundant methods in NodeSPI and removed the need for casting to NodeSPI in most cases.
  
  Revision  Changes    Path
  1.23      +10 -9     JBossCache/tests/functional/org/jboss/cache/transaction/TransactionTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TransactionTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/transaction/TransactionTest.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- TransactionTest.java	2 Jan 2007 13:13:20 -0000	1.22
  +++ TransactionTest.java	4 Jan 2007 05:35:41 -0000	1.23
  @@ -16,6 +16,7 @@
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.Node;
  +import org.jboss.cache.NodeSPI;
   import org.jboss.cache.lock.IsolationLevel;
   import org.jboss.cache.lock.NodeLock;
   
  @@ -37,7 +38,7 @@
    * Tests transactional access to a local CacheImpl.
    * Note: we use DummpyTranasctionManager to replace jta
    *
  - * @version $Id: TransactionTest.java,v 1.22 2007/01/02 13:13:20 msurtani Exp $
  + * @version $Id: TransactionTest.java,v 1.23 2007/01/04 05:35:41 msurtani Exp $
    */
   public class TransactionTest extends TestCase
   {
  @@ -536,22 +537,22 @@
         cache.put("/a/b/c", null);
         cache.put("/a/b/c", null);
   
  -      Node n = cache.get("/a");
  -      NodeLock lock = n.getNodeSPI().getLock();
  +      NodeSPI n = (NodeSPI) cache.get("/a");
  +      NodeLock lock = n.getLock();
         int num = lock.getReaderOwners().size();
         assertEquals(0, num);
         // make sure this is write locked.
         assertLocked(gtx, "/a", true);
   
  -      n = cache.get("/a/b");
  -      lock = n.getNodeSPI().getLock();
  +      n = (NodeSPI) cache.get("/a/b");
  +      lock = n.getLock();
         num = lock.getReaderOwners().size();
         assertEquals(0, num);
         // make sure this is write locked.
         assertLocked(gtx, "/a/b", true);
   
  -      n = cache.get("/a/b/c");
  -      lock = n.getNodeSPI().getLock();
  +      n = (NodeSPI) cache.get("/a/b/c");
  +      lock = n.getLock();
         num = lock.getReaderOwners().size();
         assertEquals(0, num);
         // make sure this is write locked.
  @@ -563,8 +564,8 @@
   
      private void assertLocked(Object owner, String fqn, boolean write_locked) throws Exception
      {
  -      Node n = cache.peek(Fqn.fromString(fqn));
  -      NodeLock lock = n.getNodeSPI().getLock();
  +      NodeSPI n = cache.peek(Fqn.fromString(fqn));
  +      NodeLock lock = n.getLock();
         if (owner == null)
         {
            owner = Thread.currentThread();
  
  
  



More information about the jboss-cvs-commits mailing list