Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Apache Sling Testing Clients 1.0.0, Apache Sling Testing Rules 1.0.0
-
None
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.