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

Manik Surtani msurtani at jboss.com
Mon Nov 27 12:41:01 EST 2006


  User: msurtani
  Date: 06/11/27 12:41:01

  Modified:    tests/functional/org/jboss/cache/transaction  Tag:
                        Branch_JBossCache_1_3_0 TransactionTest.java
  Log:
  Added test to exercise subtree remove locks
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.5   +20 -1     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.9.2.4
  retrieving revision 1.9.2.5
  diff -u -b -r1.9.2.4 -r1.9.2.5
  --- TransactionTest.java	25 Nov 2006 01:33:42 -0000	1.9.2.4
  +++ TransactionTest.java	27 Nov 2006 17:41:01 -0000	1.9.2.5
  @@ -27,7 +27,7 @@
    * Tests transactional access to a local TreeCache.
    * Note: we use DummpyTranasctionManager to replace jta
    *
  - * @version $Id: TransactionTest.java,v 1.9.2.4 2006/11/25 01:33:42 msurtani Exp $
  + * @version $Id: TransactionTest.java,v 1.9.2.5 2006/11/27 17:41:01 msurtani Exp $
    */
   public class TransactionTest extends TestCase {
      TreeCache cache=null;
  @@ -363,6 +363,25 @@
      }
   
   
  +   public void testNodeRemoval2() {
  +     GlobalTransaction gtx;
  +     try {
  +        cache.put("/a/b/c", null);
  +        tx.begin();
  +        gtx=cache.getCurrentTransaction();
  +        cache.remove("/a/b"); // need to remove the node, not just the data in the node.
  +        assertLocked(gtx, "/a", true);
  +        assertLocked(gtx, "/a/b", true);
  +        assertLocked(gtx, "/a/b/c", true);
  +        System.out.println("locks: " + cache.printLockInfo());
  +     }
  +     catch(Throwable t) {
  +        t.printStackTrace();
  +        fail(t.toString());
  +     }
  +  }
  +
  +
      public void testNodeDeletionRollback3() throws Exception{
         GlobalTransaction gtx;
         cache.put("/a/b/c1", null);
  
  
  



More information about the jboss-cvs-commits mailing list