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

The testing rules do not call CloseableHttpClient.close()

    XMLWordPrintableJSON

Details

    Description

      The rules being provided by the sling testing rules do not automatically call close on the underlying ClosableHttpClient which is necessary to close the dangling http connections being managed by the underlying connection manager (see https://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html#d5e217). Even custom code cannot call close, because the underlying ClosableHttpClient is not really exposed.

      I guess there is also a change necessary in testing/http/client to expose such a close method as well, and also clarify under which circumstances a new HttpClient is created or when an existing one is reused.

      Attachments

        Activity

          People

            andrei.dulvac Andrei Dulvac
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: