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

ServerSideTeleporter can't read the bundle header Sling-Test-WaitForService-Timeout

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JUnit Tests Teleporter 1.0.8, JUnit Core 1.0.18
    • JUnit Core 1.0.20
    • Testing
    • None

    Description

      The Sling-Test-WaitForService-Timeout bundle header is not properly read by the ServerSideTeleporter. The method getService() reads the bundle header using the BundleContext (bundleContext.getBundle().getHeaders()). This BundleContext is set in the Activator class on start of the bundle org.apache.sling.junit.core. Therefore bundleContext.getBundle() resolves to the bundle org.apache.sling.junit.core. This bundle does not have the proper headers. Instead the bundle headers of the bundle, which is created in the ClientSideTeleporter, including the class under test, should be used. Thus its BundleContext is needed.

      I already made the required code changes using FrameWorkUtil to retrieve the BundleContext for the class under test. I'll create a pull request, which resolves this issue.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sseifert Stefan Seifert
            marcel.jolk Marcel Jolk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment