On Wed, 12 Jun 2024 06:17:37 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> Inigo Mediavilla Saiz has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Require continuations to run the test
>
> test/hotspot/jtreg/serviceability/dcmd/thread/PrintMountedVirtualThread.java 
> line 54:
> 
>> 52:         output.shouldMatch(".*at " + 
>> Pattern.quote(DummyRunnable.class.getName()) + "\\.compute.*");
>> 53:         output.shouldMatch("Mounted virtual thread " + "\"Dummy 
>> Vthread\"" + " #" + vthread.threadId());
>> 54:         shouldFinish.set(true);
> 
> One other suggestion is to use a try-finally block here. Put L48-53 in the 
> block and set shouldFinish in the finally block. That way if the test fails 
> then it won't leave a spinning thread to disrupt the next test that runs in 
> the agent VM.
> 
> Also just to say that we've mostly used JUnit for new tests in recent 
> releases, moving away from TestNG for new tests.

Thanks @AlanBateman ! In commit 
https://github.com/openjdk/jdk/pull/19482/commits/05d861cb38cc061c79c9b7f451bf096b1cbb0ddd
 I've incorporated your suggestions.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19482#discussion_r1635924905

Reply via email to