Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 01CAA95B7 for ; Tue, 3 Jul 2012 13:19:22 +0000 (UTC) Received: (qmail 79843 invoked by uid 500); 3 Jul 2012 13:19:20 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 79710 invoked by uid 500); 3 Jul 2012 13:19:20 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 79682 invoked by uid 99); 3 Jul 2012 13:19:20 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 13:19:20 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 6983A1418F1 for ; Tue, 3 Jul 2012 13:19:20 +0000 (UTC) Date: Tue, 3 Jul 2012 13:19:20 +0000 (UTC) From: "Julian Reschke (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1356346869.144.1341321560434.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1900401003.795.1341280846273.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Comment Edited] (JCR-3371) TCK test for shareable nodes incorrectly assumes the 'mix:shareable' mixin cannot be removed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405891#comment-13405891 ] Julian Reschke edited comment on JCR-3371 at 7/3/12 1:18 PM: ------------------------------------------------------------- Optimally, the test checks that when removeMixin succeeds, the node indeed isn't shareable anymore. Can you suggest a patch that does this and works for your repository? (Also, as this is about test cases, downgrading from "critical bug" to "task") was (Author: reschke): Optimally, the test checks that when removeMixin succeeds, the node indeed isn't shareable anymore. Can you suggest a patch that does this and works for your repository? > TCK test for shareable nodes incorrectly assumes the 'mix:shareable' mixin cannot be removed > -------------------------------------------------------------------------------------------- > > Key: JCR-3371 > URL: https://issues.apache.org/jira/browse/JCR-3371 > Project: Jackrabbit Content Repository > Issue Type: Task > Components: jackrabbit-jcr-tests, JCR 2.0, test > Affects Versions: 2.5 > Reporter: Randall Hauch > Fix For: 2.5.1, 2.6 > > > The ShareableNodeTest.testRemoveMixin() assumes that removing the "mix:shareable" mixin will *always* throw an UnsupportedOperationException. This is not only checking for the incorrect exception, section 14.15 "RemoveMixin" specifically states that it *is* possible for an implementation to support removing the 'mix:shareable' mixin: > "If an attempt is made to remove the mix:shareable mixin node type from a node in a > shared set the implementation may either throw a ConstraintViolationException or allow > the removal and change the subgraph in some implementation-specific manner. > One possibility is to replace the node with a copy that has no children (if this does not > violate the node type restrictions of that node). Another possibility is to give the node > a copy of all of its descendants (unless the resulting copy operation would be unfeasible, > as would be the case if a share cycle were involved)." > Thus, even though it is possible for an implementation not to allow removing the "mix:shareable" mixin, the test shouldn't expect that an implementation will throw an exception. For example, one particularly easy thing for an implementation to support is removing 'mix:shareable' if and only if there are no other shared nodes (e.g., the "getSharedSet().getSize() == 1"). > This test could be removed, or perhaps it might be possible to test that removing the mixin (and saving) will either succeed or will throws only a ConstraintViolationException. > I marked as critical because the TCK test prevents other implementations from correctly proving compatibility. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira