jmx-dev RFR 8057134: sun/management/jmxremote/startstop/JMXStartStopTest.java failing intermittently

Daniel Fuchs daniel.fuchs at oracle.com
Wed Sep 3 15:06:56 UTC 2014


Looks good!

On 9/3/14 4:47 PM, Jaroslav Bachorik wrote:
> On 09/03/2014 04:30 PM, Daniel Fuchs wrote:
>> Hi Jaroslav,
>>
>> - import java.net.ConnectException;
>>
>> java.net.ConnectException is not a RemoteException, but
>> java.rmi.ConnectException is.
>>
>> I wonder whether the connect code may throw java.net.ConnectException,
>> or whether the test was wrong in the first place.
>>
>> If the java.net.ConnectException may be thrown then replacing
>> it with RemoteException will probably cause new failures.
>
> Good catch! Removing java.net.ConnectException doesn't seem to cause any
> apparent regressions but I'd better keep it there.
>
> http://cr.openjdk.java.net/~jbachorik/8057134/webrev.03
>
> -JB-
>
>
>>
>> best regards,
>>
>> -- daniel
>>
>>
>> On 9/3/14 4:02 PM, Jaroslav Bachorik wrote:
>>> Please, review this test change
>>>
>>> Issue : https://bugs.openjdk.java.net/browse/JDK-8057134
>>> Webrev: http://cr.openjdk.java.net/~jbachorik/8057134/webrev.02
>>>
>>> Currently the test expects one of the following exception types when
>>> trying to connect to a port not being server by the management agent -
>>> NoSuchObjectException and ConnectException. However, under certain
>>> circumstances RMI might throw ConnectIOException or any other suiting
>>> subtype of RemoteException.
>>>
>>> The solution is to check for the thrown exception being a subtype of
>>> RemoteException instead.
>>>
>>> Thanks,
>>>
>>> -JB-
>>
>



More information about the serviceability-dev mailing list