diff --git a/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java b/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java index 9f19efea098..3f91fc38085 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java @@ -27,6 +27,7 @@ * @summary Test that a listener can be removed remotely from an MBean that no longer exists. * @modules java.management/com.sun.jmx.remote.internal * @author Eamonn McManus + * @run main/othervm -XX:+UsePerfData DeadListenerTest */ import com.sun.jmx.remote.internal.ServerNotifForwarder; diff --git a/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java b/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java index 15843654d30..a34424935f0 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java +++ b/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java @@ -21,14 +21,15 @@ * questions. */ -import java.io.File; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; +import jdk.testlibrary.ProcessTools; +import jdk.testlibrary.Utils; + /** * @test * @library /lib/testlibrary @@ -39,14 +40,10 @@ import java.util.concurrent.atomic.AtomicReference; * both agent properties and jvmstat buffer. * @modules java.management/sun.management * @build jdk.testlibrary.* TestManager TestApplication - * @run main/othervm/timeout=300 -XX:+UsePerfData LocalManagementTest + * @run main/othervm/timeout=300 LocalManagementTest */ - -import jdk.testlibrary.ProcessTools; - public class LocalManagementTest { private static final String TEST_CLASSPATH = System.getProperty("test.class.path"); - private static final String TEST_JDK = System.getProperty("test.jdk"); public static void main(String[] args) throws Exception { int failures = 0; @@ -96,6 +93,8 @@ public class LocalManagementTest { private static boolean doTest(String testId, String arg) throws Exception { List args = new ArrayList<>(); + args.add("-XX:+UsePerfData"); + args.addAll(Utils.getVmOptions()); args.add("-cp"); args.add(TEST_CLASSPATH);