On Wed, 26 Aug 2026 12:32:19 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).

This pull request has now been integrated.

Changeset: abd93daa
Author:    Lee Jiwon <[email protected]>
Committer: Volkan Yazici <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/abd93daad27a0467ddaa66840d1f8dff08626076
Stats:     46 lines in 1 file changed: 42 ins; 0 del; 4 mod

8390064: Test sun/net/www/http/HttpClient/IsAvailable.java fails intermittently 
with AssertionFailedError: Connection over closed socket should not be 
available ==> expected: <false> but was: <true>

Reviewed-by: vyazici

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

PR: https://git.openjdk.org/jdk/pull/32539

Reply via email to