jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1365651 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Date Wed, 25 Jul 2012 16:03:25 GMT
Author: mduerig
Date: Wed Jul 25 16:03:25 2012
New Revision: 1365651

URL: http://svn.apache.org/viewvc?rev=1365651&view=rev
Log:
OAK-66: JCR Node Type Management
- enable tests which depend on node type management
- adapt expectation to current implementation

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java?rev=1365651&r1=1365650&r2=1365651&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Wed Jul 25 16:03:25 2012
@@ -53,6 +53,7 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Value;
 import javax.jcr.ValueFactory;
+import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.NodeType;
 import javax.jcr.nodetype.NodeTypeManager;
 import javax.jcr.nodetype.NodeTypeTemplate;
@@ -1390,7 +1391,6 @@ public class RepositoryTest extends Abst
         assertFalse(asList(nsReg.getURIs()).contains("file:///foo"));
     }
 
-    @Ignore // TODO implement node type support
     @Test
     public void mixin() throws RepositoryException {
         NodeTypeManager ntMgr = getSession().getWorkspace().getNodeTypeManager();
@@ -1416,16 +1416,11 @@ public class RepositoryTest extends Abst
             session2.logout();
         }
 
-        testNode.removeMixin("mix:test");
-        testNode.getSession().save();
-
-        session2 = createAnonymousSession();
         try {
-            mix = session2.getNode(TEST_PATH).getMixinNodeTypes();
-            assertEquals(0, mix.length);
+            testNode.removeMixin("mix:test");
+            fail("Expected ConstraintViolationException");
         }
-        finally {
-            session2.logout();
+        catch (ConstraintViolationException expected) {
         }
     }
 



Mime
View raw message