jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r919086 - in /jackrabbit/trunk: jackrabbit-jcr2dav/pom.xml jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java jackrabbit-spi2dav/pom.xml
Date Thu, 04 Mar 2010 17:46:25 GMT
Author: mduerig
Date: Thu Mar  4 17:46:25 2010
New Revision: 919086

URL: http://svn.apache.org/viewvc?rev=919086&view=rev
Log:
JCR-2528: spi2dav: ItemInfoCache causes failure of (Workspace)RestoreTest#testRestoreWithUUIDConflict
and variants 
Adding regression test

Modified:
    jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml
    jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java
    jackrabbit/trunk/jackrabbit-spi2dav/pom.xml

Modified: jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml?rev=919086&r1=919085&r2=919086&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml Thu Mar  4 17:46:25 2010
@@ -114,6 +114,8 @@
                       org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreWithUUIDConflictJcr2_4
                       org.apache.jackrabbit.test.api.version.WorkspaceRestoreTest#testWorkspaceRestoreWithUUIDConflict
                       org.apache.jackrabbit.test.api.version.WorkspaceRestoreTest#testWorkspaceRestoreWithUUIDConflictJcr2
+                      org.apache.jackrabbit.jcr2spi.MoveTest#testMoveReferenceableNode
+                      org.apache.jackrabbit.jcr2spi.WorkspaceMoveTest#testMoveReferenceableNode
                       
                       <!--  not yet debugged, unknown reason -->
                       org.apache.jackrabbit.jcr2spi.ReorderReferenceableSNSTest#testReorder2

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java?rev=919086&r1=919085&r2=919086&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java
Thu Mar  4 17:46:25 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.jackrabbit.jcr2spi;
 
+import java.io.ByteArrayInputStream;
+
 import javax.jcr.Item;
 import javax.jcr.ItemExistsException;
 import javax.jcr.Node;
@@ -25,15 +27,13 @@
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.jcr.Workspace;
 
-import org.apache.jackrabbit.test.NotExecutableException;
+import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.commons.JcrUtils;
+import org.apache.jackrabbit.test.NotExecutableException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.ByteArrayInputStream;
-
 /**
  * <code>MoveTest</code>...
  */
@@ -263,6 +263,23 @@
         }
     }
 
+    /**
+     * Regression tests for JCR-2528
+     * @throws RepositoryException
+     */
+    public void testMoveReferenceableNode() throws RepositoryException {
+        moveNode.addMixin(JcrConstants.MIX_REFERENCEABLE);
+        moveNode.getSession().save();
+
+        superuser.move(moveNode.getPath(), destParentNode.getPath() + "/" + moveNode.getName());
+        superuser.save();
+        destParentNode.remove();
+
+        // JCR-2528 caused this call to throw a javax.jcr.InvalidItemStateException: Item
has already
+        // been removed by someone else. Status = REMOVED
+        destParentNode.getSession().save();
+    }
+
 
     public void testMoveFile() throws RepositoryException, NotExecutableException {
         // create a new file

Modified: jackrabbit/trunk/jackrabbit-spi2dav/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/pom.xml?rev=919086&r1=919085&r2=919086&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/pom.xml Thu Mar  4 17:46:25 2010
@@ -112,6 +112,8 @@
                   org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreWithUUIDConflictJcr2_4
                   org.apache.jackrabbit.test.api.version.WorkspaceRestoreTest#testWorkspaceRestoreWithUUIDConflict
                   org.apache.jackrabbit.test.api.version.WorkspaceRestoreTest#testWorkspaceRestoreWithUUIDConflictJcr2
+                  org.apache.jackrabbit.jcr2spi.MoveTest#testMoveReferenceableNode
+                  org.apache.jackrabbit.jcr2spi.WorkspaceMoveTest#testMoveReferenceableNode
 
                   <!--  not yet debugged, unknown reason -->
                   org.apache.jackrabbit.jcr2spi.ReorderReferenceableSNSTest#testReorder2



Mime
View raw message