Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-4741

add test coverage for mandatory non-residual child nodes

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.22, 2.21.12, 2.20.7
    • test
    • None

    Description

      The enforcement should be covered by tests which try to

      Attachments

        1. JCR-4741-v01.patch
          2 kB
          Konrad Windszus
        2. JCR-4741-v02.patch
          3 kB
          Konrad Windszus

        Issue Links

          Activity

            With the JCR-4741-v01.patch running the integration tests on jackrabbit-core fails with

            [INFO] Running org.apache.jackrabbit.core.integration.JCRAPITest
            [ERROR] Tests run: 1908, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 20.185 s <<< FAILURE! - in org.apache.jackrabbit.core.integration.JCRAPITest
            [ERROR] testAddNodeLackingMandatoryChildNode(org.apache.jackrabbit.test.api.NodeTest)  Time elapsed: 0.038 s  <<< FAILURE!
            junit.framework.AssertionFailedError: Adding a node without its mandatory child node should throw a ConstraintViolationException
            	at org.apache.jackrabbit.test.api.NodeTest.testAddNodeLackingMandatoryChildNode(NodeTest.java:525)
            
            kwin Konrad Windszus added a comment - With the JCR-4741-v01.patch running the integration tests on jackrabbit-core fails with [INFO] Running org.apache.jackrabbit.core.integration.JCRAPITest [ERROR] Tests run: 1908, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 20.185 s <<< FAILURE! - in org.apache.jackrabbit.core.integration.JCRAPITest [ERROR] testAddNodeLackingMandatoryChildNode(org.apache.jackrabbit.test.api.NodeTest) Time elapsed: 0.038 s <<< FAILURE! junit.framework.AssertionFailedError: Adding a node without its mandatory child node should throw a ConstraintViolationException at org.apache.jackrabbit.test.api.NodeTest.testAddNodeLackingMandatoryChildNode(NodeTest.java:525)
            reschke Julian Reschke added a comment -

            Are you sure you are testing with a nodetype having a mandatory child node?

            reschke Julian Reschke added a comment - Are you sure you are testing with a nodetype having a mandatory child node?

            The updated JCR-4741-v02.patch sets the necessary property for the test and now it passes for me.
            reschke Can you have a look?

            kwin Konrad Windszus added a comment - The updated JCR-4741-v02.patch sets the necessary property for the test and now it passes for me. reschke Can you have a look?
            reschke Julian Reschke added a comment -

            Just to confirm: that test confirms that Jackrabbit Classic is working ok, and Oak lacks the check?

            reschke Julian Reschke added a comment - Just to confirm: that test confirms that Jackrabbit Classic is working ok, and Oak lacks the check?
            kwin Konrad Windszus added a comment - - edited

            I haven't tried with Oak, but JR2 works as expected (according to spec). IIRC you created this ticket initially triggered by OAK-9621 (which is only about mandatory residual nodes).

            kwin Konrad Windszus added a comment - - edited I haven't tried with Oak, but JR2 works as expected (according to spec). IIRC you created this ticket initially triggered by OAK-9621 (which is only about mandatory residual nodes).
            reschke Julian Reschke added a comment -

            Ack. Ok, so go ahead and apply it.

            reschke Julian Reschke added a comment - Ack. Ok, so go ahead and apply it.

            Applied to trunk in r1902488.

            kwin Konrad Windszus added a comment - Applied to trunk in r1902488 .
            reschke Julian Reschke added a comment - - edited

            trunk: (2.21.12) r1902488
            2.20: (2.20.7) r1903322
            2.16: r1905149

            reschke Julian Reschke added a comment - - edited trunk: (2.21.12) r1902488 2.20: (2.20.7) r1903322 2.16: r1905149

            People

              kwin Konrad Windszus
              reschke Julian Reschke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: