Details
-
Bug
-
Resolution: Fixed
-
P4
-
21
-
b19
Description
The HttpClient close tests could be improved to provide better diagnosis. The test makes some requests and register some dependent action to check the response state, followed by some dependent action that will read the request body (from an input stream). But if the first dependent action asserts, the body will not be read nor close, which will prevent HttpClient::close method, or the HttpClient::awaitTermination method, to terminate as expected, and the test will then later fail in timeout - either from jtreg or awaitTermination. This can be confusing for failure analysis. Also, the test executor - called 'readerService' in which dependent actions are executed should not be closed until all dependent actions have been submitted. Instead of having one such executor per test method, it would be simpler and more resilient to create it in `setup()` and close it in `teardown()`.
Attachments
Issue Links
- relates to
-
JDK-8267140 Support closing the HttpClient by making it auto-closable
-
- Resolved
-