Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4654

Support ResourceResolver.findResources with JCR_MOCK

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Testing Sling Mock 1.2.0
    • Testing Sling Mock 1.3.0
    • Testing
    • None

    Description

      Although JCR Mocks supports mocking queries (https://sling.apache.org/documentation/development/jcr-mock.html#mocking-queries) this is not being propagated to the Sling API when using Sling Mocks with JCR_MOCK as the resource resolver type. Whenever you execute ResourceResolver.findResources on such a mock it will always return no results.
      The expected behaviour would be that any mocked queries through MockJcr.setQueryResult would be considered also for ResourceResolver.findResources. Attached is a test case for Sling Mocks which currently fails due to findResource not returning anything.

      Attachments

        1. SLING-4654-testcasev2.diff
          2 kB
          Konrad Windszus

        Issue Links

          Activity

            People

              sseifert Stefan Seifert
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: