changeset 10185:82be07eba22b

8047073: Some javax/management/ fails with JFR Reviewed-by: egahlin, dfuchs
author jbachorik
date Tue, 24 Jun 2014 19:58:03 +0200
parents 07eb3be7e64b
children c84527dd35be
files test/javax/management/MBeanServer/MBeanFallbackTest.java test/javax/management/ObjectName/SerialCompatTest.java test/javax/management/mxbean/MXBeanFallbackTest.java test/javax/management/proxy/JMXProxyFallbackTest.java
diffstat 4 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/management/MBeanServer/MBeanFallbackTest.java	Tue Jun 24 10:46:08 2014 -0700
+++ b/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/test/javax/management/ObjectName/SerialCompatTest.java	Tue Jun 24 10:46:08 2014 -0700
+++ b/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/test/javax/management/mxbean/MXBeanFallbackTest.java	Tue Jun 24 10:46:08 2014 -0700
+++ b/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/test/javax/management/proxy/JMXProxyFallbackTest.java	Tue Jun 24 10:46:08 2014 -0700
+++ b/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);