On Tue, 1 Apr 2025 19:11:02 GMT, Volkan Yazici <vyaz...@openjdk.org> wrote:
>> Adds `HttpResponse::connectionLabel` method that provides an identifier for >> the connection. >> >> **Implementation note:** The feature is facilitated by >> `HttpConnection::label`, which should not be confused with >> `HttpConnection::id`. This distinction is explained in the JavaDoc of both >> properties. > > Volkan Yazici has updated the pull request incrementally with one additional > commit since the last revision: > > Apply review suggestions test/jdk/java/net/httpclient/HttpResponseConnectionLabelTest.java line 156: > 154: "Server[%s] is waiting for the > latch... (connectionKey=%s, responseBody=%s)", > 155: serverId, connectionKey, > responseBody); > 156: > assertTrue(serverResponseLatchRef[0].await(2, TimeUnit.SECONDS)); We should avoid using any kind of timeouts here and in other places where we call this `await(...)` in this test. Given how varied the test execution environments are and our past experience with such timeouts, there's no right timeout to choose from. Instead, we should just do a `await()` without the timeout, so that if for whatever reason the latch isn't counted down, then the jtreg test execution timeout (which is controlled and configured externally to the test) will kick in and jtreg will do the necessary work of failing the test and also gathering detailed diagnostics through any failure handlers that are configured in that test execution environment. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24154#discussion_r2024659607