RFR: 8267140: Support closing the HttpClient by making it auto-closable [v11]
Daniel Fuchs
dfuchs at openjdk.org
Thu Mar 23 09:28:51 UTC 2023
On Thu, 23 Mar 2023 07:04:45 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Daniel Fuchs has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Minor updates. Added some links
>> - Define operations. Clarify some of the things that may stall an orderly shutdown
>
> 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...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13019#discussion_r1145902816
More information about the net-dev
mailing list