8057134: sun/management/jmxremote/startstop/JMXStartStopTest.java failing intermittently
authorjbachorik
Wed, 03 Sep 2014 17:08:58 +0200
changeset 26365 a828828378f6
parent 26364 d0c49e0d085f
child 26366 13499e3d43df
8057134: sun/management/jmxremote/startstop/JMXStartStopTest.java failing intermittently Reviewed-by: sla, dfuchs
jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java
--- a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java	Wed Sep 03 16:05:41 2014 +0200
+++ b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java	Wed Sep 03 17:08:58 2014 +0200
@@ -26,7 +26,7 @@
 import java.lang.reflect.Method;
 import java.net.ConnectException;
 import java.net.ServerSocket;
-import java.rmi.NoSuchObjectException;
+import java.rmi.RemoteException;
 import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
 import java.util.ArrayList;
@@ -174,9 +174,9 @@
         } catch (Exception e) {
             Throwable t = e;
             while (t != null) {
-                if (t instanceof NoSuchObjectException ||
-                    t instanceof ConnectException ||
-                    t instanceof SSLHandshakeException) {
+                if (t instanceof RemoteException ||
+                    t instanceof SSLHandshakeException ||
+                    t instanceof ConnectException) {
                     break;
                 }
                 t = t.getCause();