8307305: Update debugger tests to support JTREG_TEST_THREAD_FACTORY mode

Reviewed-by: cjplummer
This commit is contained in:
Leonid Mesnik 2023-05-04 03:51:24 +00:00
parent 3599448ad8
commit caee1beaaf
4 changed files with 3 additions and 1 deletions

View File

@ -46,7 +46,8 @@ public final class MainWrapper {
Finalizer finalizer = new Finalizer(new FinalizableObject());
finalizer.activate();
// Some tests use this property to understand if virtual threads are used
System.setProperty("main.wrapper", wrapperName);
Runnable task = () -> {
try {

View File

@ -513,6 +513,7 @@ abstract public class TestScaffold extends TargetAdapter {
// Need to change args to run wrapper using command like 'TestScaffold Virtual <app-name>'
String mainWrapper = System.getProperty("main.wrapper");
if (mainWrapper != null && !argInfo.targetAppCommandLine.isEmpty()) {
argInfo.targetVMArgs += "-Dmain.wrapper=" + mainWrapper;
argInfo.targetAppCommandLine = TestScaffold.class.getName() + ' '
+ mainWrapper + ' ' + argInfo.targetAppCommandLine;
} else if ("true".equals(System.getProperty("test.enable.preview"))) {