8047073: Some javax/management/ fails with JFR
authorjbachorik
Tue, 24 Jun 2014 19:58:03 +0200
changeset 25164 06c6cc3a5930
parent 25163 a7918e311ea4
child 25165 b7751b856cae
8047073: Some javax/management/ fails with JFR Reviewed-by: egahlin, dfuchs
jdk/test/javax/management/MBeanServer/MBeanFallbackTest.java
jdk/test/javax/management/ObjectName/SerialCompatTest.java
jdk/test/javax/management/mxbean/MXBeanFallbackTest.java
jdk/test/javax/management/proxy/JMXProxyFallbackTest.java
--- a/jdk/test/javax/management/MBeanServer/MBeanFallbackTest.java	Tue Jun 24 10:46:08 2014 -0700
+++ b/jdk/test/javax/management/MBeanServer/MBeanFallbackTest.java	Tue Jun 24 19:58:03 2014 +0200
@@ -35,7 +35,7 @@
  * @author Jaroslav Bachorik
  * @run clean MBeanFallbackTest
  * @run build MBeanFallbackTest
- * @run main MBeanFallbackTest
+ * @run main/othervm -Djdk.jmx.mbeans.allowNonPublic=true MBeanFallbackTest
  */
 public class MBeanFallbackTest {
     private static interface PrivateMBean {
@@ -51,7 +51,6 @@
     private static int failures = 0;
 
     public static void main(String[] args) throws Exception {
-        System.setProperty("jdk.jmx.mbeans.allowNonPublic", "true");
         testPrivate(PrivateMBean.class, new Private());
 
         if (failures == 0)
--- a/jdk/test/javax/management/ObjectName/SerialCompatTest.java	Tue Jun 24 10:46:08 2014 -0700
+++ b/jdk/test/javax/management/ObjectName/SerialCompatTest.java	Tue Jun 24 19:58:03 2014 +0200
@@ -28,7 +28,7 @@
  * @author Eamonn McManus, Daniel Fuchs
  * @run clean SerialCompatTest
  * @run build SerialCompatTest
- * @run main/othervm SerialCompatTest
+ * @run main/othervm -Djdk.jmx.mbeans.allowNonPublic=true -Djmx.serial.form=1.0 SerialCompatTest
  */
 
 import java.io.*;
@@ -223,8 +223,6 @@
     }
 
     public static void main(String[] args) throws Exception {
-        System.setProperty("jmx.serial.form", "1.0");
-
         /* Check that we really are in jmx.serial.form=1.0 mode.
         The property is frozen the first time the ObjectName class
         is referenced so checking that it is set to the correct
--- a/jdk/test/javax/management/mxbean/MXBeanFallbackTest.java	Tue Jun 24 10:46:08 2014 -0700
+++ b/jdk/test/javax/management/mxbean/MXBeanFallbackTest.java	Tue Jun 24 19:58:03 2014 +0200
@@ -30,7 +30,7 @@
  * @author Jaroslav Bachorik
  * @run clean MXBeanFallbackTest
  * @run build MXBeanFallbackTest
- * @run main MXBeanFallbackTest
+ * @run main/othervm -Djdk.jmx.mbeans.allowNonPublic=true MXBeanFallbackTest
  */
 
 import javax.management.MBeanServer;
@@ -40,7 +40,6 @@
 
 public class MXBeanFallbackTest {
     public static void main(String[] args) throws Exception {
-        System.setProperty("jdk.jmx.mbeans.allowNonPublic", "true");
         testPrivateMXBean("Private", new Private());
 
         if (failures == 0)
--- a/jdk/test/javax/management/proxy/JMXProxyFallbackTest.java	Tue Jun 24 10:46:08 2014 -0700
+++ b/jdk/test/javax/management/proxy/JMXProxyFallbackTest.java	Tue Jun 24 19:58:03 2014 +0200
@@ -36,7 +36,7 @@
  * @author Jaroslav Bachorik
  * @run clean JMXProxyFallbackTest
  * @run build JMXProxyFallbackTest
- * @run main JMXProxyFallbackTest
+ * @run main/othervm -Djdk.jmx.mbeans.allowNonPublic=true JMXProxyFallbackTest
  */
 public class JMXProxyFallbackTest {
     private static interface PrivateMBean {
@@ -56,7 +56,6 @@
     private static int failures = 0;
 
     public static void main(String[] args) throws Exception {
-        System.setProperty("jdk.jmx.mbeans.allowNonPublic", "true");
         testPrivate(PrivateMBean.class);
         testPrivate(PrivateMXBean.class);