RFR (xs) 8132003: Update javax/management regression test for Verona (versioning)
Iris Clark
iris.clark at oracle.com
Tue Jul 21 17:21:44 UTC 2015
Hi, Jaroslav, Shanliang, and Daniel.
Thank you all for speedy review. I'll push the changeset to verona/stage shortly.
Regards,
iris
-----Original Message-----
From: Jaroslav Bachorik
Sent: Tuesday, July 21, 2015 3:33 AM
To: serviceability-dev at openjdk.java.net
Subject: Re: RFR (xs) 8132003: Update javax/management regression test for Verona (versioning)
Looks fine. Not likely this test will ever be run on pre JDK 1.5.
-JB-
On 21.7.2015 07:30, Iris Clark wrote:
> Hi.
>
> Please review changes to resolve the following bug:
>
> 8132003: Update javax/management regression test for Verona
> (versioning)
> Bug: https://bugs.openjdk.java.net/browse/JDK-8132003
>
> The regression test javax/management/remote/mandatory/notif/NotSerializableNotifTest.java fails in Verona [0,1] builds because it assumes that the system property java.verison will always begin with "1.". Verona drops this part of the version string for JDK 9 and later.
>
> The test attempts to discern whether it is being run against JDK 1.4 or earlier. Since I believe that this test will never be run against JDK 1.4, I expect that we can entirely remove the conditional. Here's the required diff:
>
> --- a/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java
> Mon Jul 20 11:01:24 2015 -0700
> +++ b/test/javax/management/remote/mandatory/notif/NotSerializableNoti
> +++ fTest.java
> Mon Jul 20 19:31:54 2015 -0700 @@ -24,7 +24,7 @@
> /*
> * @test
> * @summary Tests to send a not serializable notification.
> - * @bug 5022196
> + * @bug 5022196 8132003
> * @author Shanliang JIANG
> * @modules java.management
> * @run clean NotSerializableNotifTest @@ -53,22 +53,13 @@
> private static final MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
> private static ObjectName emitter;
>
> - private static String[] protocols;
> + private static String[] protocols = new String[] {"rmi", "iiop",
> + "jmxmp"};
>
> private static final int sentNotifs = 10;
>
> public static void main(String[] args) throws Exception {
> System.out.println(">>> Test to send a not serializable
> notification");
>
> - // IIOP fails on JDK1.4, see 5034318
> - final String v = System.getProperty("java.version");
> - float f = Float.parseFloat(v.substring(0, 3));
> - if (f<1.5) {
> - protocols = new String[] {"rmi", "jmxmp"};
> - } else {
> - protocols = new String[] {"rmi", "iiop", "jmxmp"};
> - }
> -
> emitter = new ObjectName("Default:name=NotificationEmitter");
> mbeanServer.registerMBean(new NotificationEmitter(),
> emitter);
>
> If you believe that we need to keep the conditional, I can submit an alternate diff. Let me know what you'd prefer. Please also let me know if there are any JMX-specific development processes I should be aware of (e.g. required number of Reviewers, testing requirements, etc.).
>
> After review, the changeset will be pushed to verona/stage [2]. The changeset will go to jdk9/* when Verona is complete later this summer.
>
> Thanks,
> iris
>
> [0] http://openjdk.java.net/projects/verona
> [1] http://openjdk.java.net/jeps/223
> [2] http://hg.openjdk.java.net/verona/stage
>
More information about the verona-dev
mailing list