RFR: 8330523: Reduce runtime and improve efficiency of KeepAliveTest [v3]

Daniel Jeliński djelinski at openjdk.org
Wed Apr 24 14:07:29 UTC 2024


On Wed, 24 Apr 2024 13:30:09 GMT, Christoph Langer <clanger at openjdk.org> wrote:

>> test/jdk/sun/net/www/http/HttpClient/KeepAliveTest.java line 112:
>> 
>>> 110:     private volatile boolean isProxySet;
>>> 111: 
>>> 112:     private CountDownLatch serverLatch = new CountDownLatch(1);
>> 
>> CountDownLatch is not reusable; consider using a Semaphore here
>
> Yes, but there's always new instance per test. One could certainly change it to use a global static semaphore...

Ah, good point, missed that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18817#discussion_r1577954607


More information about the net-dev mailing list