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

Manik Surtani msurtani at jboss.com
Mon Jan 1 17:12:20 EST 2007


  User: msurtani
  Date: 07/01/01 17:12:20

  Modified:    tests/functional/org/jboss/cache/api  NodeMoveAPITest.java
  Log:
  - FqnComparator should not be in the optimistic subpackage
  - Fixed move() related issues
  
  Revision  Changes    Path
  1.17      +21 -2     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.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- NodeMoveAPITest.java	31 Dec 2006 03:01:20 -0000	1.16
  +++ NodeMoveAPITest.java	1 Jan 2007 22:12:20 -0000	1.17
  @@ -78,6 +78,10 @@
         log.info("BEFORE MOVE " + cache);
         // move
         cache.move(nodeC.getFqn(), nodeB.getFqn());
  +
  +      // re-fetch nodeC
  +      nodeC = cache.get(new Fqn(nodeB.getFqn(), C));
  +
         log.info("POST MOVE " + cache);
         log.info("HC " + nodeC + " " + System.identityHashCode(nodeC));
         Node x = cache.getRoot().getChild(Fqn.fromString("b/c"));
  @@ -144,6 +148,7 @@
         //System.out.println("nodeC " + nodeC);      
   
         // child nodes will need refreshing, since existing pointers will be stale.
  +      nodeC = nodeB.getChild(C);
         nodeD = nodeC.getChild(D);
         nodeE = nodeD.getChild(E);
   
  @@ -309,16 +314,30 @@
   
         System.out.println("Loader" + loader);
   
  -      log.info("Current tree is " + cache.printLockInfo());
  +      log.info("Current tree is " + cache.printDetails());
   
         cache.evict(Fqn.ROOT, true);
   
  -      log.info("POST EVICT tree is " + cache.printLockInfo());
  +      log.info("POST EVICT tree is " + cache.printDetails());
   
         // move
         if (useTx) tm.begin();
         cache.move(nodeC.getFqn(), nodeB.getFqn());
  +
  +//      Fqn[] fqns = {A, B, new Fqn(B, C), new Fqn(new Fqn(B, C), D), new Fqn(new Fqn(new Fqn(B, C), D), E)};
  +//      System.out.println("*** LOADER BEFORE COMMIT ");
  +//      for (Fqn f: fqns)
  +//      {
  +//         System.out.println("  Fqn: " + f);
  +//         System.out.println("  Contents in loader: " + loader.get(f));
  +//      }
         if (useTx) tm.commit();
  +//      System.out.println("*** LOADER AFTER COMMIT ");
  +//      for (Fqn f: fqns)
  +//      {
  +//         System.out.println("  Fqn: " + f);
  +//         System.out.println("  Contents in loader: " + loader.get(f));
  +//      }
   
         log.info("Post commit tree is " + cache.printDetails());
   
  
  
  



More information about the jboss-cvs-commits mailing list