[jbosscache-commits] JBoss Cache SVN: r5737 - in core/trunk/src: test/java/org/jboss/cache/api and 1 other directory.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Mon Apr 28 15:09:53 EDT 2008
Author: manik.surtani at jboss.com
Date: 2008-04-28 15:09:53 -0400 (Mon, 28 Apr 2008)
New Revision: 5737
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java
core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
Log:
Fixed regressions
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java 2008-04-28 18:56:13 UTC (rev 5736)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java 2008-04-28 19:09:53 UTC (rev 5737)
@@ -54,13 +54,13 @@
public Object perform(InvocationContext ctx)
{
- _move(fqn, to, false, ctx);
+ move(fqn, to, false, ctx);
return null;
}
public void rollback()
{
- _move(Fqn.fromRelativeElements(to, fqn.getLastElement()), fqn.getParent(), true, null);
+ move(Fqn.fromRelativeElements(to, fqn.getLastElement()), fqn.getParent(), true, null);
}
@@ -75,7 +75,7 @@
return visitor.visitMoveCommand(ctx, this);
}
- public void _move(Fqn nodeToMoveFqn, Fqn newParentFqn, boolean skipNotifications, InvocationContext ctx)
+ private void move(Fqn nodeToMoveFqn, Fqn newParentFqn, boolean skipNotifications, InvocationContext ctx)
{
// the actual move algorithm.
NodeSPI newParent = dataContainer.findNode(newParentFqn);
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-04-28 18:56:13 UTC (rev 5736)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-04-28 19:09:53 UTC (rev 5737)
@@ -312,7 +312,12 @@
nodeD.put(k, vD);
nodeE = nodeD.addChild(E);
nodeE.put(k, vE);
- cache.evict(Fqn.ROOT, true);
+ cache.evict(Fqn.ROOT);
+ cache.evict(A);
+ cache.evict(B);
+ cache.evict(C);
+ cache.evict(D);
+ cache.evict(E);
// move
if (useTx) tm.begin();
@@ -346,8 +351,17 @@
assertEquals(nodeC, nodeD.getParent());
assertEquals(nodeD, nodeE.getParent());
- if (pasv) cache.evict(Fqn.ROOT, true);
+ if (pasv)
+ {
+ cache.evict(Fqn.ROOT);
+ cache.evict(nodeA.getFqn());
+ cache.evict(nodeB.getFqn());
+ cache.evict(nodeC.getFqn());
+ cache.evict(nodeD.getFqn());
+ cache.evict(nodeE.getFqn());
+ }
+
//now inspect the loader.
assertEquals(vA, loader.get(nodeA.getFqn()).get(k));
assertEquals(vB, loader.get(nodeB.getFqn()).get(k));
More information about the jbosscache-commits
mailing list