RFR: 8223783: sun/net/www/http/HttpClient/MultiThreadTest.java sometimes detect threads+1 connections [v4]

Daniel Fuchs dfuchs at openjdk.org
Wed Nov 23 12:03:29 UTC 2022


On Wed, 23 Nov 2022 08:31:15 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Incorporated review feedback
>
> test/jdk/sun/net/www/http/HttpClient/MultiThreadTest.java line 253:
> 
>> 251: 
>> 252:             if (validConnections != cnt) {
>> 253:                 // these connections are not necessarily unexpected if SLEEP exceeds keep-alive.
> 
> Well actually these are unexpected connections; every connection from the tested client will equally count towards `cnt` and `validConnections`.

Ah! good point. I mixed up cnt and threads. I will clean that up.

> test/jdk/sun/net/www/http/HttpClient/MultiThreadTest.java line 390:
> 
>> 388:         volatile int timeoutExceeded;
>> 389:         // Number of requests handled by this worker
>> 390:         volatile int requestHandled;
> 
> not used

yeah. it happens to be the same thing than headerFound, unless there's an exception while sending the reply.

> test/jdk/sun/net/www/http/HttpClient/MultiThreadTest.java line 423:
> 
>> 421:          * than the KEEP_ALIVE timeout. This will be true if the worker detected
>> 422:          * that the idle timeout was exceeded between two consecutive request, or
>> 423:          * if the time between the last reply
> 
> this needs cleanup

In what way?

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

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


More information about the net-dev mailing list