You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2008/09/18 16:22:44 UTC

[jira] Commented: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

    [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632219#action_12632219 ] 

Bertrand Delacretaz commented on SLING-665:
-------------------------------------------

The event code tries to create a slingevent:Event node under a sling:Folder, and that doesn't work anymore due to the SLING-663 changes.

The solution is to add the sling:HierarchyNode mixin to the slingevent:Event nodetype, I tried that but the test still fails as it seems that the new resource.cnd nodetypes are not registered correctly (although they should, see AbstractRepositoryEventHandlerTest.setupRepository).

I got the tests to pass with event.cnd as shown below, duplicating the required resource.cnd entries - so the only problem left is why resource.cnd is not loaded during tests. But right now I have to run ;-)

<slingevent='http://sling.apache.org/jcr/event/1.0'>
<sling = 'http://sling.apache.org/jcr/sling/1.0'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
<mix='http://www.jcp.org/jcr/mix/1.0'>

[sling:Folder] > nt:folder
  - * (undefined) multiple
  - * (undefined)
  + * (nt:hierarchyNode) = sling:Folder version

[sling:HierarchyNode] > nt:hierarchyNode
    mixin
    
[slingevent:Event] > nt:unstructured, sling:HierarchyNode
  - slingevent:topic (string)
  - slingevent:application (string)
  - slingevent:created (date)
  - slingevent:properties (binary)
  
[slingevent:Job] > slingevent:Event, mix:lockable
  - slingevent:processor (string)
  - slingevent:id (string)
  - slingevent:finished (date)
 
[slingevent:TimedEvent] > slingevent:Event, mix:lockable
  - slingevent:processor (string)
  - slingevent:id (string)
  - slingevent:expression (string)
  - slingevent:date (date)
  - slingevent:period (long)

> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>            Reporter: Bertrand Delacretaz
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

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