RFR: 8369920: HttpClient QuicSelectorThread could be a VirtualThread [v3]

Daniel Fuchs dfuchs at openjdk.org
Tue Nov 4 15:03:04 UTC 2025


On Mon, 3 Nov 2025 21:03:09 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

>> Daniel Fuchs has updated the pull request incrementally with 11 additional commits since the last revision:
>> 
>>  - Apply suggestion from @dfuch
>>  - Update test/jdk/java/net/httpclient/http3/H3QuicVTTest.java
>>    
>>    Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
>>  - Update test/jdk/java/net/httpclient/http3/H3QuicVTTest.java
>>    
>>    Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
>>  - Update test/jdk/java/net/httpclient/http3/H3QuicVTTest.java
>>    
>>    Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
>>  - Update test/jdk/java/net/httpclient/http3/H3QuicVTTest.java
>>    
>>    Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
>>  - Update test/jdk/java/net/httpclient/http3/H3QuicVTTest.java
>>    
>>    Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
>>  - Update test/jdk/java/net/httpclient/http3/H3QuicVTTest.java
>>    
>>    Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
>>  - Update test/jdk/java/net/httpclient/http3/H3QuicVTTest.java
>>    
>>    Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
>>  - Update test/jdk/java/net/httpclient/http3/H3QuicVTTest.java
>>    
>>    Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
>>  - Update test/jdk/java/net/httpclient/http3/H3QuicVTTest.java
>>    
>>    Co-authored-by: Volkan Yazıcı <volkan.yazici at oracle.com>
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/8a53537c...3a0b2a69
>
> test/jdk/java/net/httpclient/http3/H3QuicVTTest.java line 57:
> 
>> 55:  * @library /test/lib /test/jdk/java/net/httpclient/lib
>> 56:  * @build jdk.test.lib.net.SimpleSSLContext
>> 57:  *        jdk.httpclient.test.lib.common.HttpServerAdapters
> 
> @sormuras, in this JUnit test, given these `@build` classes are already included in `@library`, do we still need this explicit `@build`?

All our tests do that and we had a few iterations before finding something that worked reliably. My2c is don't change it unless it starts causing trouble.

> test/jdk/java/net/httpclient/http3/H3QuicVTTest.java line 206:
> 
>> 204:                 .map(Thread::getName)
>> 205:                 .toList());
>> 206:         boolean found = threads.contains(name);
> 
> Using thread name for this check looks very fragile. Can we devise a more programmatic method? E.g., ensuring no `StackTraceElement` contains `QuicSelectorThread`?

It's a bit fragile but if we change the name of the thread we will just have to change the test. Looking through the stack trace elements could be more fragile.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27827#discussion_r2490834901
PR Review Comment: https://git.openjdk.org/jdk/pull/27827#discussion_r2490818481


More information about the net-dev mailing list