jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1205925 - in /jackrabbit/trunk: jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/ jackrabbit-core/src/test/resources/ test/compatibility/base/src/main/java/org/apache/jackrabbit/harness/compatibility/
Date Thu, 24 Nov 2011 16:43:25 GMT
Author: jukka
Date: Thu Nov 24 16:43:22 2011
New Revision: 1205925

URL: http://svn.apache.org/viewvc?rev=1205925&view=rev
Log:
JCR-3155: Node not locked after upgrade to Jackrabbit 2.2.9

Add a compatibility test that checks whether open-scoped locks survive an upgrade

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/BackwardsCompatibilityTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/resources/compatibility.zip
    jackrabbit/trunk/test/compatibility/base/src/main/java/org/apache/jackrabbit/harness/compatibility/AbstractRepositoryTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/BackwardsCompatibilityTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/BackwardsCompatibilityTest.java?rev=1205925&r1=1205924&r2=1205925&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/BackwardsCompatibilityTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/BackwardsCompatibilityTest.java
Thu Nov 24 16:43:22 2011
@@ -105,6 +105,7 @@ public class BackwardsCompatibilityTest 
         Node versionable = assertVersionable(test);
         assertProperties(test, versionable);
         assertVersionableCopy(test, versionable);
+        assertLock(test);
         assertUsers(session);
     }
 
@@ -172,6 +173,12 @@ public class BackwardsCompatibilityTest 
         test.save();
     }
 
+    private void assertLock(Node test) throws RepositoryException {
+        Node lock = test.getNode("lock");
+        assertTrue(lock.isLocked());
+        assertTrue(lock.hasProperty("jcr:lockOwner"));
+    }
+
     private void assertUsers(Session session) throws RepositoryException {
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/test/resources/compatibility.zip
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/resources/compatibility.zip?rev=1205925&r1=1205924&r2=1205925&view=diff
==============================================================================
Binary files - no diff available.

Modified: jackrabbit/trunk/test/compatibility/base/src/main/java/org/apache/jackrabbit/harness/compatibility/AbstractRepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/compatibility/base/src/main/java/org/apache/jackrabbit/harness/compatibility/AbstractRepositoryTest.java?rev=1205925&r1=1205924&r2=1205925&view=diff
==============================================================================
--- jackrabbit/trunk/test/compatibility/base/src/main/java/org/apache/jackrabbit/harness/compatibility/AbstractRepositoryTest.java
(original)
+++ jackrabbit/trunk/test/compatibility/base/src/main/java/org/apache/jackrabbit/harness/compatibility/AbstractRepositoryTest.java
Thu Nov 24 16:43:22 2011
@@ -126,6 +126,7 @@ public class AbstractRepositoryTest {
 
         Node versionable = createVersionable(test);
         createProperties(test, versionable);
+        createLock(test);
         createUsers(session);
     }
 
@@ -167,6 +168,14 @@ public class AbstractRepositoryTest {
         parent.save();
     }
 
+    protected void createLock(Node parent) throws RepositoryException {
+        Node lock = parent.addNode("lock", "nt:unstructured");
+        lock.addMixin("mix:lockable");
+        parent.save();
+
+        lock.lock(true, false);
+    }
+
     protected void createUsers(Session session) throws RepositoryException {
     }
 



Mime
View raw message