RFR: 8267140: Support closing the HttpClient by making it auto-closable [v11]
Daniel Fuchs
dfuchs at openjdk.org
Thu Mar 23 09:28:52 UTC 2023
On Thu, 23 Mar 2023 09:24:51 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> test/jdk/java/net/httpclient/AsyncShutdownNow.java line 249:
>>
>>> 247: try {
>>> 248: try {
>>> 249: if (client.awaitTermination(Duration.ofMillis(2000))) {
>>
>> Hello Daniel, given our past experience of such timeouts leading to intermittent failures (on slow systems), do you think we should perhaps use a timeout duration of one day here? That way we don't have to guess the right timeout value and the jtreg test framework can timeout this test if it executes past the configured test timeout.
>
> We have called `shutdownNow` and at this point we have already waited until all completable futures have been terminated, so hopefully there should not be long to wait. If there is, it might indicate a bug - for instance that the SelectorManager thread was not woken properly. So I'd rather keep the 2s for now - see if it causes trouble. It hasn't in my numerous test runs, but yes - I haven't run this test with -Xint or -Xcomp in debug builds...
If it fails I'd like to do some analysis of the logs before just increasing the timeout.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13019#discussion_r1145904069
More information about the net-dev
mailing list