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

Manik Surtani manik at jboss.org
Tue Jun 12 03:39:50 EDT 2007


  User: msurtani
  Date: 07/06/12 03:39:50

  Modified:    tests/functional/org/jboss/cache/options 
                        ForceWriteLockTest.java
  Log:
  JBCACHE-1102
  
  Revision  Changes    Path
  1.5       +8 -0      JBossCache/tests/functional/org/jboss/cache/options/ForceWriteLockTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ForceWriteLockTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/options/ForceWriteLockTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- ForceWriteLockTest.java	7 Feb 2007 22:06:47 -0000	1.4
  +++ ForceWriteLockTest.java	12 Jun 2007 07:39:50 -0000	1.5
  @@ -48,6 +48,8 @@
         cache.put(fqn, "k", "v");
         tm.begin();
         cache.get(fqn, "k");
  +      // parent should be read-locked!!
  +      assertLocked(cache.getInvocationContext().getGlobalTransaction(), fqn.getParent(), false);
         assertLocked(cache.getInvocationContext().getGlobalTransaction(), fqn, false);
         tm.commit();
         assertNotLocked(fqn);
  @@ -60,6 +62,8 @@
         tm.begin();
         cache.getInvocationContext().getOptionOverrides().setForceWriteLock(true);
         cache.get(fqn, "k");
  +      // parent should be read-locked!!
  +      assertLocked(cache.getInvocationContext().getGlobalTransaction(), fqn.getParent(), false);
         assertLocked(cache.getInvocationContext().getGlobalTransaction(), fqn, true);
         tm.commit();
         assertNotLocked(fqn);
  @@ -74,6 +78,8 @@
         tm.begin();
         cache.getInvocationContext().getOptionOverrides().setForceWriteLock(true);
         cache.put(fqn, "k", "v2");
  +      // parent should be read-locked!!
  +      assertLocked(cache.getInvocationContext().getGlobalTransaction(), fqn.getParent(), false);
         assertLocked(cache.getInvocationContext().getGlobalTransaction(), fqn, true);
         tm.commit();
         assertNotLocked(fqn);
  @@ -88,6 +94,8 @@
         tm.begin();
         cache.getInvocationContext().getOptionOverrides().setForceWriteLock(true);
         cache.remove(fqn, "k");
  +      // parent should be read-locked!!
  +      assertLocked(cache.getInvocationContext().getGlobalTransaction(), fqn.getParent(), false);
         assertLocked(cache.getInvocationContext().getGlobalTransaction(), fqn, true);
         tm.commit();
         assertNotLocked(fqn);
  
  
  



More information about the jboss-cvs-commits mailing list