RFR: 8377302: HttpServer::stop uses full timeout duration if handler throws
Volkan Yazici
vyazici at openjdk.org
Mon Feb 9 21:27:38 UTC 2026
On Mon, 9 Feb 2026 16:53:04 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> test/jdk/com/sun/net/httpserver/FailAndStopTest.java line 178:
>>
>>> 176: System.out.println("Server listening at: " + server.getAddress());
>>> 177: try {
>>> 178: server.createContext("/FailAndStopTest/", new FailAndStopTest());
>>
>> *Nit:* Rename resiliency?
>>
>> Suggestion:
>>
>> server.createContext('/' + FailAndStopTest.class.getSimpleName() + '/', new FailAndStopTest());
>>
>>
>> Note that `.path("/FailAndStopTest/")` line below needs to be adapted too.
>
> I don't see a reason to use `FailAndStopTest.class.getSimpleName()` rather than hardcoded "FailAndStopTest". In my experience when using copy/paste on the test this doesn't get handled by the IDE either way.
Using `X.class.getSimpleName()` helps when the class gets renamed, but I'm fine if you leave it in its current form.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29606#discussion_r2784000636
More information about the net-dev
mailing list