jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r157932 - incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock/LockTest.java
Date Thu, 17 Mar 2005 10:06:57 GMT
Author: mreutegg
Date: Thu Mar 17 02:06:55 2005
New Revision: 157932

URL: http://svn.apache.org/viewcvs?view=rev&rev=157932
Log:
- mix:referenceable is not needed for locking tests.

Modified:
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock/LockTest.java

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock/LockTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock/LockTest.java?view=diff&r1=157931&r2=157932
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock/LockTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/lock/LockTest.java
Thu Mar 17 02:06:55 2005
@@ -27,12 +27,10 @@
  * <code>LockTest</code> contains the test cases for the lock support in
  * the JCR specification.
  * <p/>
- * Configuration requirements:<br/>
- * The node at {@link #testRoot} must allow child nodes of type
- * {@link #testNodeType} with name {@link #nodeName1}. The {@link #testNodeType}
- * must allow child nodes of the same node type. If {@link #testNodeType} is not
- * mix:referenceable and mix:lockable the two mixin types are added to the node
- * instance created with {@link #testNodeType}.
+ * @tck.config testroot must allow child nodes of type <code>nodetype</code>
+ * @tck.config nodetype nodetype which is lockable or allows to add mix:lockable.
+ * The node must also allow child nodes with the same node type as itself. 
+ * @tck.config nodename1 name of a lockable child node of type <code>nodetype</code>.
  *
  * @test
  * @sources LockTest.java
@@ -47,7 +45,6 @@
     public void testAddRemoveLockToken() throws Exception {
         // create new node
         Node n = testRootNode.addNode(nodeName1, testNodeType);
-        n.addMixin(mixReferenceable);
         n.addMixin(mixLockable);
         testRootNode.save();
 
@@ -104,7 +101,6 @@
     public void testNodeLocked() throws Exception {
         // create new node and lock it
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
-        n1.addMixin(mixReferenceable);
         n1.addMixin(mixLockable);
         testRootNode.save();
 
@@ -118,7 +114,7 @@
         Session otherSuperuser = helper.getSuperuserSession();
 
         // get same node
-        Node n2 = otherSuperuser.getNodeByUUID(n1.getUUID());
+        Node n2 = (Node) otherSuperuser.getItem(n1.getPath());
 
         // assert: lock token must be null for other session
         assertNull("Lock token must be null for other session",
@@ -214,7 +210,6 @@
     public void testShallowLock() throws Exception {
         // create new nodes
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
-        n1.addMixin(mixReferenceable);
         n1.addMixin(mixLockable);
         Node n2 = n1.addNode(nodeName2, testNodeType);
         testRootNode.save();
@@ -232,10 +227,8 @@
     public void testParentChildLock() throws Exception {
         // create new nodes
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
-        n1.addMixin(mixReferenceable);
         n1.addMixin(mixLockable);
         Node n2 = n1.addNode(nodeName2, testNodeType);
-        n2.addMixin(mixReferenceable);
         n2.addMixin(mixLockable);
         testRootNode.save();
 
@@ -258,10 +251,8 @@
     public void testParentChildDeepLock() throws Exception {
         // create new nodes
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
-        n1.addMixin(mixReferenceable);
         n1.addMixin(mixLockable);
         Node n2 = n1.addNode(nodeName2, testNodeType);
-        n2.addMixin(mixReferenceable);
         n2.addMixin(mixLockable);
         testRootNode.save();
 
@@ -283,7 +274,6 @@
     public void testLogout() throws Exception {
         // add node
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
-        n1.addMixin(mixReferenceable);
         n1.addMixin(mixLockable);
         testRootNode.save();
 
@@ -291,7 +281,7 @@
         Session otherSuperuser = helper.getSuperuserSession();
 
         // get node created above
-        Node n2 = otherSuperuser.getNodeByUUID(n1.getUUID());
+        Node n2 = (Node) otherSuperuser.getItem(n1.getPath());
 
         // lock node
         Lock lock = n2.lock(false, true);
@@ -318,7 +308,6 @@
     public void testLockTransfer() throws Exception {
         // add node
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
-        n1.addMixin(mixReferenceable);
         n1.addMixin(mixLockable);
         testRootNode.save();
 
@@ -326,7 +315,7 @@
         Session otherSuperuser = helper.getSuperuserSession();
 
         // get node created above
-        Node n2 = otherSuperuser.getNodeByUUID(n1.getUUID());
+        Node n2 = (Node) otherSuperuser.getItem(n1.getPath());
 
         // lock node
         Lock lock = n2.lock(false, true);
@@ -356,7 +345,6 @@
     public void testOpenScopedLocks() throws Exception {
         // add node
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
-        n1.addMixin(mixReferenceable);
         n1.addMixin(mixLockable);
         testRootNode.save();
 
@@ -364,7 +352,7 @@
         Session otherSuperuser = helper.getSuperuserSession();
 
         // get node created above
-        Node n2 = otherSuperuser.getNodeByUUID(n1.getUUID());
+        Node n2 = (Node) otherSuperuser.getItem(n1.getPath());
 
         // lock node
         Lock lock = n2.lock(false, false);
@@ -387,7 +375,6 @@
     public void testRefresh() throws Exception {
         // create new node
         Node n = testRootNode.addNode(nodeName1, testNodeType);
-        n.addMixin(mixReferenceable);
         n.addMixin(mixLockable);
         testRootNode.save();
 
@@ -424,10 +411,8 @@
     public void testGetLock() throws Exception {
         // create new nodes
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
-        n1.addMixin(mixReferenceable);
         n1.addMixin(mixLockable);
         Node n2 = n1.addNode(nodeName2, testNodeType);
-        n2.addMixin(mixReferenceable);
         n2.addMixin(mixLockable);
         testRootNode.save();
 



Mime
View raw message