RFR: 8368625: com/sun/net/httpserver/ServerStopTerminationTest.java fails intermittently [v3]

Daniel Fuchs dfuchs at openjdk.org
Wed Oct 29 18:15:34 UTC 2025


On Fri, 24 Oct 2025 15:00:43 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:

>> I believe that increasing the timeout might help, as it seems to be happening due to the machine load. I'm going to make a pr increasing the timeout to 20 from 5 (similar to what it was when timeout factor was 4).
>
> Mikhail Yankelevich has updated the pull request incrementally with one additional commit since the last revision:
> 
>   comments

Changes requested by dfuchs (Reviewer).

test/jdk/com/sun/net/httpserver/ServerStopTerminationTest.java line 171:

> 169: 
> 170:         // Complete the exchange 10 second into the future.
> 171:         // Runs in parallel, so won't block the server stop

Nit: when we reach here the server has already been stopped. 
So:

1. the comment is inaccurate.
2. we don't need the virtual thread or the exchangeDuration here. Just call countDown on the latch directly.
3. the first check `elapsed >= exchangeDuration.toNanos()` is not needed - since `exchangeDuration` is not needed.

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

PR Review: https://git.openjdk.org/jdk/pull/27670#pullrequestreview-3395143925
PR Review Comment: https://git.openjdk.org/jdk/pull/27670#discussion_r2474500984


More information about the net-dev mailing list