On Mon, 23 Mar 2026 19:39:25 GMT, Brent Christian <[email protected]> wrote:

>> I've looked into it, and if `@requires` uses `""` instead of `null`, these 
>> other run modes (`jtreg` and `make test`) will also skip the test (`"Test 
>> results: no tests selected"`). (Thanks to @dholmes-ora for the idea.)
>> 
>> From the bug report:
>> It's worth noting that only the method of running tests from the original 
>> bug (`jib.sh  make -- run-test JTREG_TEST_THREAD_FACTORY=Virtual TEST=...`) 
>> actually causes tests to be run with virtual threads;
>> it sets the thread factory to virtual **_in the jtreg process_**.
>> 
>> This is not so for
>> `jtreg ... -javaoptions:-Dtest.thread.factory=Virtual ...`
>> or
>> `make test ... JTREG="JAVA_OPTIONS=-Dtest.thread.factory=Virtual" ...`
>> 
>> One can confirm this with a small test such as:
>> 
>> 
>> /**
>>  * @test
>>  * @run main/othervm VirtThreadCheck
>>  */
>> public class VirtThreadCheck {
>>     public static void main(String[] args) {
>>         Thread thisThread = Thread.currentThread();
>>         System.out.println("main thread is: " + thisThread);
>>         System.out.println("virtual? : " + thisThread.isVirtual());
>>     }
>> }
>
> Brent Christian has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   update copyright year

Thank you Brent, looks good to me.

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

Marked as reviewed by jpai (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/30350#pullrequestreview-3995777598

Reply via email to