jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-2159) Several test cases fail when declaring nt:base / nt:hierarchy node types as 'abstract'
Date Fri, 19 Jun 2009 07:13:07 GMT

    [ https://issues.apache.org/jira/browse/JCR-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721678#action_12721678
] 

Marcel Reutegger commented on JCR-2159:
---------------------------------------

One possible solution is to ask the JSR 283 EG to declare those abstract flags as implementation
variants. And mark those node types as non-abstract in jackrabbit.

But in any case we'll have to fix the test cases.

> Several test cases fail when declaring nt:base / nt:hierarchy node types as 'abstract'

> ---------------------------------------------------------------------------------------
>
>                 Key: JCR-2159
>                 URL: https://issues.apache.org/jira/browse/JCR-2159
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests
>    Affects Versions: 2.0.0
>            Reporter: Tobias Bocanegra
>            Priority: Blocker
>             Fix For: 2.0.0
>
>
> JSR283 introduces a new node type attribute 'abstract' and defines nt:base and nt:hierarchyNode
as such.
> when changing those nodetypes, the following test cases fail:
> Failed tests: 
>   testDefinedAndLegalType(org.apache.jackrabbit.test.api.nodetype.CanAddChildNodeCallWithNodeTypeTest)
>   testResidualAndLegalType(org.apache.jackrabbit.test.api.nodetype.CanAddChildNodeCallWithNodeTypeTest)
> Tests in error: 
>   testAddNodeConstraintViolationExceptionUndefinedNodeType(org.apache.jackrabbit.test.api.NodeTest)
>   testRemoveMandatoryNode(org.apache.jackrabbit.test.api.NodeTest)
>   testCloneNodesConstraintViolationException(org.apache.jackrabbit.test.api.WorkspaceCloneTest)
>   testCopyNodesConstraintViolationException(org.apache.jackrabbit.test.api.WorkspaceCopyBetweenWorkspacesTest)
>   testCopyNodesConstraintViolationException(org.apache.jackrabbit.test.api.WorkspaceCopyTest)
>   testMoveNodesConstraintViolationException(org.apache.jackrabbit.test.api.WorkspaceMoveTest)
>   testNodeTypeConstraintViolationWorkspaceWithHandler(org.apache.jackrabbit.test.api.SerializationTest)
>   testNodeTypeConstraintViolationSessionWithHandler(org.apache.jackrabbit.test.api.SerializationTest)
>   testNodeTypeConstraintViolationWorkspace(org.apache.jackrabbit.test.api.SerializationTest)
>   testNodeTypeConstraintViolationSession(org.apache.jackrabbit.test.api.SerializationTest)
>   testJoinFilterPrimaryType(org.apache.jackrabbit.test.api.query.SQLJoinTest)
>   testElementTest(org.apache.jackrabbit.test.api.query.ElementTest)
>   testElementTestAnyNode(org.apache.jackrabbit.test.api.query.ElementTest)
>   testElementTestAnyNodeNtBase(org.apache.jackrabbit.test.api.query.ElementTest)
>   testElementTestAnyNodeSomeNT(org.apache.jackrabbit.test.api.query.ElementTest)
>   testElementTestNameTest(org.apache.jackrabbit.test.api.query.ElementTest)
>   testElementTestNameTestNtBase(org.apache.jackrabbit.test.api.query.ElementTest)
>   testElementTestNameTestSomeNT(org.apache.jackrabbit.test.api.query.ElementTest)
>   testElementTestNameTestSomeNTWithSNS(org.apache.jackrabbit.test.api.query.ElementTest)
>   testNodeType(org.apache.jackrabbit.test.api.observation.AddEventListenerTest)
> here's a stacktrace of a failing test:
> javax.jcr.nodetype.ConstraintViolationException: nt:hierarchyNode: is an abstract node
type.
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:768)
>         at org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:737)
>         at org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:691)
>         at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:2147)
>         at org.apache.jackrabbit.test.api.SessionTest.testMoveItemExistsException(SessionTest.java:69)
> the failing tests are actually a backwards compatibility issue. nt:base and nt:hierarchyNode
were
> non-abstract in JCR 1.0, i.e. 
>      node.addNode("foo", "nt:base");
> was perfectly legal.
> however, as of JCR 2.0, above statement fails. all above mentioned tests fail because
they 
> create nodes of type nt:base or nt:hierarchyNode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message