On Fri, 28 Aug 2026 11:04:35 GMT, Lee Jiwon <[email protected]> wrote:

>> Replaces the fixed delay in `IsAvailable.java` with reads from the socket 
>> used by `HttpClient::available`.
>> The tests wait for EOF or data on that socket before invoking the existing 
>> `HttpClient::available` assertion.
>> 
>> No production code is changed.
>> 
>> Testing:
>> - `make test TEST='test/jdk/sun/net/www/http/HttpClient/IsAvailable.java' 
>> JTREG='REPEAT_COUNT=200;VERBOSE=summary;RETAIN=fail'` (200/200 passed)
>> - `make test TEST='test/jdk/sun/net/www/http/HttpClient/IsAvailable.java' 
>> JTREG='VERBOSE=summary;RETAIN=fail;VM_OPTIONS=-Dsun.net.client.defaultReadTimeout=200'`
>>  (passed)
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Lee Jiwon has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8390064: Apply batched suggestions from code review
>   
>   Co-authored-by: Volkan Yazıcı <[email protected]>

test/jdk/sun/net/www/http/HttpClient/IsAvailable.java line 175:

> 173:         private static final Predicate<HttpClient> AVAILABLE_ACCESSOR = 
> findAvailableAccessor();
> 174: 
> 175:         private static final Function<HttpClient, Socket> 
> SERVER_SOCKET_ACCESSOR = findServerSocketAccessor();

Hm, what’s the reason for those additional closure indirection?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32539#discussion_r3886158262

Reply via email to