On Thu, 27 Nov 2025 10:13:02 GMT, Volkan Yazici <[email protected]> wrote:
>> Daniel Fuchs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> test update: remove left over from debug session
>
> test/jdk/java/net/httpclient/PlainConnectionLockTest.java line 131:
>
>> 129:
>> 130: @BeforeEach
>> 131: synchronized void beforeTest() throws Exception {
>
> Do we really need `synchronized` here?
Probably not - as Junit should take care that methods don't run concurrently.
But on windows my test got wedged for reasons I could not explain so I started
doubting everything. In particular - we don't want one test method (or server)
reusing the semaphore that had been created for the other method. That's also
why the server handler captures those semaphore instead of reading the field.
The problem on windows has been resolved now - it was caused by insufficient
backlog, but I'll keep the synchronize, it should not hurt.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28430#discussion_r2568483247