RFR: 8301638: A number of nsk/jdi invokemethod tests should be converted to create virtual threads
Chris Plummer
cjplummer at openjdk.org
Thu Feb 9 19:45:22 UTC 2023
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.
-------------
Commit messages:
- Convert a few invokemethod tests to use more vthreads on the debuggee side.
Changes: https://git.openjdk.org/jdk/pull/12500/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12500&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8301638
Stats: 30 lines in 5 files changed: 0 ins; 0 del; 30 mod
Patch: https://git.openjdk.org/jdk/pull/12500.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12500/head:pull/12500
PR: https://git.openjdk.org/jdk/pull/12500
More information about the serviceability-dev
mailing list