jmx-dev RFR: 8022220 Intermittent test failures in javax/management/remote/mandatory/connection/RMIConnectionIdTest.java

Chris Hegarty chris.hegarty at oracle.com
Thu Oct 3 08:29:48 PDT 2013



On 10/03/2013 04:02 PM, Jaroslav Bachorik wrote:
> .......
> But it might hardly matter - it seems that the main culprit for this
> test to fail on this particular configuration was the fact that
> 127.0.0.1 was *NOT* detected as a loopback IP. This is pretty weird and

I have not looked at the specifics, but if you have an InetAddress 
instance you can invoke the isLoopbackAddress() [1][2] method to 
correctly determine if the instance is a valid loopback address.

-Chris.

[1] 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/54e099776f08/src/share/classes/java/net/Inet4Address.java
[2] 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/54e099776f08/src/share/classes/java/net/Inet6Address.java

> makes one question the sanity of the test setup...
>
> -JB-
>
>>
>> -Dmitry
>>
>>
>> On 2013-09-11 18:51, Jaroslav Bachorik wrote:
>>> Please, review this simple patch for an intermittently failing test.
>>>
>>> The test fails in cases when the connection loopback is resolved to be
>>> 127.0.1.1 - it may happen under certain circumstances in eg. Ubuntu. The
>>> test does not anticipate this possibility and requires the loopback
>>> address to be exactly 127.0.0.1
>>>
>>> The test will end comparing 127.0.0.1 against 127.0.1.1 and will
>>> consider them non equal even though they are both the same loopback. The
>>> patch adds a bit of flexibility to the test allowing for any two valid
>>> loopback addresses (127.0.0.0/8) to be equal.
>>>
>>> Issue  : JDK-8022220
>>> Webrev : http://cr.openjdk.java.net/~jbachorik/8022220/webrev.00
>>>
>>> Thanks,
>>>
>>> -JB-
>>>
>>
>>
>


More information about the serviceability-dev mailing list