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

Sling Mocks should validate for closed ResourceResolvers

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Testing
    • Labels:
      None

      Description

      It would be good if the SlingMock library could include some checks after tests, that

      • the default resource resolver (context.resourceresolver()) is not closed.
      • that any resource resolver opened by other means is closed properly.

      And fail the test if the resource resolver is not properly handled (closed/not closed).

      While this does not necessarily mean that the code handles the resourceresolvers well (you could implement the correct handling in the testcase, and leaving an insufficient one in the actual code), it can help to point out the problem, that the resourceResolvers are not properly handled.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              joerghoh Jörg Hoh
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: