RFR: JDK-8311792: java/net/httpclient/ResponsePublisher.java fails intermittently with AssertionError: Found some outstanding operations

Daniel Fuchs dfuchs at openjdk.org
Wed Aug 23 16:41:23 UTC 2023


On Wed, 16 Aug 2023 12:23:27 GMT, Darragh Clarke <dclarke at openjdk.org> wrote:

> Currently `ResponsePublisher` occasionally fails due to unreleased resources.
> Updated test based on [AbstractThrowingPushPromises](https://github.com/openjdk/jdk/blob/b80001de0c0aeedeb412430660a4727fc26be98b/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java#L343) to ensure that non-shared clients get closed before further iterations run, this should limit the max number of clients that remain alive during the test.
> 
> I ran tiers 1-3 and everything is passing

test/jdk/java/net/httpclient/ResponsePublisher.java line 498:

> 496:     // we use the ReferenceTracker API rather than HttpClient::close here,
> 497:     // because these tests inject faults by throwing inside callbacks, which
> 498:     // is more likely to get HttpClient::close wedged until jtreg times out.

No, we do not inject faults here.

Suggestion:

    // Wait for the client to be garbage collected.
    // we use the ReferenceTracker API rather than HttpClient::close here,
    // because we want to get some diagnosis if a client doesn't release
    // its resources and terminates as expected

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15307#discussion_r1303281595


More information about the net-dev mailing list