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

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


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

  Modified:    tests/functional/org/jboss/cache/api    NodeAPITest.java
                        NodeAPIOptimisticTest.java SyncReplTxTest.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.13      +15 -1     JBossCache/tests/functional/org/jboss/cache/api/NodeAPITest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeAPITest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/NodeAPITest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- NodeAPITest.java	3 Jan 2007 23:45:56 -0000	1.12
  +++ NodeAPITest.java	4 Jan 2007 05:35:37 -0000	1.13
  @@ -165,7 +165,7 @@
         try
         {
            rootNode.getChildren().clear();
  -         fail("Collection of child nodes returned in getChildren() should be immutable");
  +         fail("Collection of child nodes returned in getChildrenDirect() should be immutable");
         }
         catch (Exception e)
         {
  @@ -213,4 +213,18 @@
         assertEquals(0, rootNode.getKeys().size());
         assertTrue(rootNode.getData().isEmpty());
      }
  +
  +   public void testClearingDataTx() throws Exception
  +   {
  +      tm.begin();
  +      rootNode.put("k", "v");
  +      rootNode.put("k2", "v2");
  +      assertEquals(2, rootNode.getKeys().size());
  +      rootNode.clearData();
  +      assertEquals(0, rootNode.getKeys().size());
  +      assertTrue(rootNode.getData().isEmpty());
  +      tm.commit();
  +      assertTrue(rootNode.getData().isEmpty());
  +   }
  +
   }
  
  
  
  1.2       +0 -1      JBossCache/tests/functional/org/jboss/cache/api/NodeAPIOptimisticTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeAPIOptimisticTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/NodeAPIOptimisticTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- NodeAPIOptimisticTest.java	3 Jan 2007 23:45:56 -0000	1.1
  +++ NodeAPIOptimisticTest.java	4 Jan 2007 05:35:37 -0000	1.2
  @@ -5,7 +5,6 @@
    */
   public class NodeAPIOptimisticTest extends NodeAPITest
   {
  -
      public NodeAPIOptimisticTest()
      {
         optimistic = true;
  
  
  
  1.5       +1 -2      JBossCache/tests/functional/org/jboss/cache/api/SyncReplTxTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SyncReplTxTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/SyncReplTxTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- SyncReplTxTest.java	2 Jan 2007 18:26:05 -0000	1.4
  +++ SyncReplTxTest.java	4 Jan 2007 05:35:37 -0000	1.5
  @@ -9,7 +9,6 @@
   
   import junit.framework.TestCase;
   import org.jboss.cache.Cache;
  -import org.jboss.cache.CacheSPI;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.InvocationContext;
   import org.jboss.cache.Node;
  @@ -114,7 +113,7 @@
   
      private void assertInvocationContextInitState(Cache c)
      {
  -      InvocationContext ctx = ((CacheSPI) c).getInvocationContext();
  +      InvocationContext ctx = c.getInvocationContext();
         InvocationContext control = null;
         try
         {
  
  
  



More information about the jboss-cvs-commits mailing list