RFR: 8316580: HttpClient with StructuredTaskScope does not close when a task fails [v3]

Mikko Apo duke at openjdk.org
Thu Sep 28 10:05:10 UTC 2023


On Tue, 26 Sep 2023 16:11:12 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> test/jdk/java/net/httpclient/HttpGetInCancelledFuture.java line 97:
>> 
>>> 95:     }
>>> 96: 
>>> 97:     static final String HOST = "localhost:62057";
>> 
>> Should we have something listening on that port? Some of our tests used to fail after receiving an unexpected connenction, and 62057 is in the ephemeral range.
>
> @djelinski Now done.

I'm the submitter of the bug report. I found the issue when the server was down and nothing was listening in the port.

The bug also happens if there is a server listening in the port, the server sends a response and the code running in the subtask throws an Exception. For this case it seems I need to use more concurrent threads to achieve the same effect. For no servers 70 was enough but for a running server I need 200.

The test program I wrote is available at: https://github.com/mikko-apo/jvm21-demo/blob/main/jvm21-demo/src/main/java/fi/iki/apo/HttpGetBurst.java and I use it against helidon/quickstart-standalone-mp-4m2 which is in the same repository.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15883#discussion_r1338562474


More information about the net-dev mailing list