Return-Path: X-Original-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A3D8D6A8 for ; Wed, 25 Jul 2012 16:04:14 +0000 (UTC) Received: (qmail 22433 invoked by uid 500); 25 Jul 2012 16:04:14 -0000 Delivered-To: apmail-jackrabbit-oak-commits-archive@jackrabbit.apache.org Received: (qmail 22415 invoked by uid 500); 25 Jul 2012 16:04:13 -0000 Mailing-List: contact oak-commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-commits@jackrabbit.apache.org Delivered-To: mailing list oak-commits@jackrabbit.apache.org Received: (qmail 22379 invoked by uid 99); 25 Jul 2012 16:04:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2012 16:04:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2012 16:04:10 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EBE5B23888CD; Wed, 25 Jul 2012 16:03:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: oak-commits@jackrabbit.apache.org From: mduerig@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120725160325.EBE5B23888CD@eris.apache.org> 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) { } }