RFR: 8301638: A number of nsk/jdi invokemethod tests should be converted to create virtual threads

Chris Plummer cjplummer at openjdk.org
Fri Feb 10 19:32:53 UTC 2023


On Thu, 9 Feb 2023 19:37:53 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> As part of the initial loom work, some nsk/jdi invokemethod tests were converted to support testing with virtual threads.  However, for some reason a few of the tests were skipped when the initial conversion was done. This PR converts the remaining tests.
> 
> The general approach is to take the Thread subclass defined by the debuggee and change it to instead extend NamedTask. Then  JDIThreadFactory.newThread(NamedTask) is used to create the Thread instance, passing the task instance in as argument. JDIThreadFactory.newThread(NamedTask) will create a virtual thread or a platform thread depending on the setting of the main.wrapper property. Tests are run with -Dmain.wrapper=Virtual to trigger using virtual threads.

thanks for the reviews Serguei, Alex, and Leonid.

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

PR: https://git.openjdk.org/jdk/pull/12500


More information about the serviceability-dev mailing list