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

Manik Surtani msurtani at jboss.com
Fri Sep 22 12:26:28 EDT 2006


  User: msurtani
  Date: 06/09/22 12:26:28

  Modified:    tests/functional/org/jboss/cache/api   NodeMoveAPITest.java
                        NodeReplicatedMoveTest.java
  Log:
  Added more tests for moving CLs within a tx
  
  Revision  Changes    Path
  1.8       +15 -3     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.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- NodeMoveAPITest.java	22 Sep 2006 08:49:01 -0000	1.7
  +++ NodeMoveAPITest.java	22 Sep 2006 16:26:28 -0000	1.8
  @@ -223,15 +223,25 @@
   
      public void testWithCacheloaders() throws Exception
      {
  -      doCacheLoaderTest(false);
  +      doCacheLoaderTest(false, false);
      }
   
      public void testWithPassivation() throws Exception
      {
  -      doCacheLoaderTest(true);
  +      doCacheLoaderTest(true, false);
      }
   
  -   protected void doCacheLoaderTest(boolean pasv) throws Exception
  +   public void testWithCacheloadersTx() throws Exception
  +   {
  +      doCacheLoaderTest(false, true);
  +   }
  +
  +   public void testWithPassivationTx() throws Exception
  +   {
  +      doCacheLoaderTest(true, true);
  +   }
  +
  +   protected void doCacheLoaderTest(boolean pasv, boolean useTx) throws Exception
      {
         cache.stop();
         cache.getConfiguration().setCacheLoaderConfiguration(getSingleCacheLoaderConfig(pasv, "", DummyInMemoryCacheLoader.class.getName(), null, false, false, false, false));
  @@ -284,7 +294,9 @@
         System.out.println("Current tree is " + ((TreeCacheProxyImpl) cache).treeCache.printLockInfo());
   
         // move
  +      if (useTx) tm.begin();
         nodeC.move(nodeB);
  +      if (useTx) tm.commit();
   
         // after eviction, the node objects we hold are probably stale.
         nodeA = rootNode.getChild(A);
  
  
  
  1.3       +0 -4      JBossCache/tests/functional/org/jboss/cache/api/NodeReplicatedMoveTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeReplicatedMoveTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/NodeReplicatedMoveTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- NodeReplicatedMoveTest.java	22 Sep 2006 08:49:01 -0000	1.2
  +++ NodeReplicatedMoveTest.java	22 Sep 2006 16:26:28 -0000	1.3
  @@ -142,8 +142,6 @@
   
         assertEquals(vA, cache[0].getChild(A).get(k));
         assertEquals(vB, cache[0].getChild(B).get(k));
  -      assertEquals(vA, cache[1].getChild(A).get(k));
  -      assertEquals(vB, cache[1].getChild(A).getChild(B).get(k));
   
         tm.commit();
   
  @@ -173,8 +171,6 @@
   
         assertEquals(vA, cache[0].getChild(A).get(k));
         assertEquals(vB, cache[0].getChild(B).get(k));
  -      assertEquals(vA, cache[1].getChild(A).get(k));
  -      assertEquals(vB, cache[1].getChild(A).getChild(B).get(k));
   
         tm.rollback();
   
  
  
  



More information about the jboss-cvs-commits mailing list