Index: src/main/java/org/apache/jackrabbit/test/api/NodeUUIDTest.java
===================================================================
--- src/main/java/org/apache/jackrabbit/test/api/NodeUUIDTest.java (revision 520964)
+++ src/main/java/org/apache/jackrabbit/test/api/NodeUUIDTest.java (working copy)
@@ -23,6 +23,7 @@
import javax.jcr.Node;
import javax.jcr.Session;
import javax.jcr.ReferentialIntegrityException;
+import javax.jcr.InvalidItemStateException;
import javax.jcr.nodetype.NoSuchNodeTypeException;
/**
@@ -86,13 +87,15 @@
/**
* Moves a referencable node using {@link javax.jcr.Session#move(String,
- * String)} with one session and saves afterward changes made with a second
+ * String)} with one session and saves afterward changes made with a second
* session to the moved node using {@link Node#save()}.
* Procedure:
InvalidItemStateException if 'move' is reported to the second
+ * session as a sequence of remove and add events. javax.jcr.tck.NodeUUIDTest.nodetype2 must have the mixin
* type mix:referenceable assigned.javax.jcr.tck.NodeUUIDTest.testSaveMovedRefNode.propertyname1
@@ -125,11 +128,15 @@
superuser.save();
// modify some prop of the moved node with session 2
- refTargetNodeSession2.setProperty(propertyName1, "test");
+ try {
+ refTargetNodeSession2.setProperty(propertyName1, "test");
- // save it
- refTargetNodeSession2.save();
- // ok, works as expected
+ // save it
+ refTargetNodeSession2.save();
+ // ok, works as expected
+ } catch (InvalidItemStateException e) {
+ // ok as well.
+ }
} finally {
testSession.logout();
}
Index: src/main/java/org/apache/jackrabbit/test/api/SessionUUIDTest.java
===================================================================
--- src/main/java/org/apache/jackrabbit/test/api/SessionUUIDTest.java (revision 520964)
+++ src/main/java/org/apache/jackrabbit/test/api/SessionUUIDTest.java (working copy)
@@ -23,6 +23,7 @@
import javax.jcr.RepositoryException;
import javax.jcr.ReferentialIntegrityException;
import javax.jcr.Session;
+import javax.jcr.InvalidItemStateException;
/**
* SessionUUIDTest contains all tests for the {@link javax.jcr.Session}
@@ -96,7 +97,9 @@
* InvalidItemStateException if 'move' is reported
+ * to the second session as a sequence of remove and add events.
* javax.jcr.tck.SessionUUIDTest.nodetype2 must have the mixin type mix:referenceable assigned.