On Wed, 17 Aug 2022 17:06:12 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
> Please find here a change that improves SpecialHeadersTest. This test creates > a large amount of ephemeral clients and has been observed running out of heap > space in our CI once. This change updates the test to wait for the previous > HttpClient to be eligible for garbage collection before it creates a new one. > It also verifies that no outstanding operation are still running on the > client by the time the client is released. test/jdk/java/net/httpclient/SpecialHeadersTest.java line 370: > 368: System.gc(); > 369: var error = TRACKER.check(500); > 370: if (error != null) throw error; Given slowness on CI systems, would it be better to use the jtreg timeout factor here to adjust the `500ms` timeout? Or better still, perhaps just log a warning instead of throwing an error? After all this test's main goal is to verify the request headers and in that context it should be OK if some HttpClient(s) aren't gc collected by the time the test completes? ------------- PR: https://git.openjdk.org/jdk/pull/9908