[ 
https://issues.apache.org/jira/browse/FLINK-12646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Victor Wong updated FLINK-12646:
--------------------------------
    Description: 
In
{code:java}
org.apache.flink.runtime.rest.RestClientTest#testConnectionTimeout
{code}
, we use a "unroutableIp" with a value of  "10.255.255.1" for test.

But sometimes this IP is reachable in a private network of a company, which is 
the case for me. As a result, this test failed with a following exception: 

 
{code:java}
java.lang.AssertionError: Expected: an instance of 
org.apache.flink.shaded.netty4.io.netty.channel.ConnectTimeoutException but: 
<org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException:
 Connection refused: /10.255.255.1:80> is a 
org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException
 at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20) at 
org.junit.Assert.assertThat(Assert.java:956) at 
org.junit.Assert.assertThat(Assert.java:923) at 
org.apache.flink.runtime.rest.RestClientTest.testConnectionTimeout(RestClientTest.java:76)
 ...
{code}
 

 

Can we change the `unroutableIp` to a reserved IP address, i.e "240.0.0.0", 
which is described as  _Reserved for future use_ in 
([https://en.wikipedia.org/wiki/Reserved_IP_addresses])

Or change the assertion? 

  was:
In
{code:java}
// code placeholder
{code}
`org.apache.flink.runtime.rest.RestClientTest#testConnectionTimeout`, we use a 
`unroutableIp` with a value of  "10.255.255.1" for test.

But sometimes this IP is reachable in a private network of a company, which is 
the case for me. As a result, this test failed with a following exception: 

```

java.lang.AssertionError: 
 Expected: an instance of 
org.apache.flink.shaded.netty4.io.netty.channel.ConnectTimeoutException
 but: 
<org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException:
 Connection refused: /10.255.255.1:80> is a 
org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException

at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
 at org.junit.Assert.assertThat(Assert.java:956)
 at org.junit.Assert.assertThat(Assert.java:923)
 at 
org.apache.flink.runtime.rest.RestClientTest.testConnectionTimeout(RestClientTest.java:76)
 ...

```

 

Can we change the `unroutableIp` to a reserved IP address, i.e "240.0.0.0", 
which is described as 

> Reserved for future use.

in [wikipedia]([https://en.wikipedia.org/wiki/Reserved_IP_addresses])

Or change the assertion? 


> Fix broken tests of RestClientTest
> ----------------------------------
>
>                 Key: FLINK-12646
>                 URL: https://issues.apache.org/jira/browse/FLINK-12646
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / REST
>            Reporter: Victor Wong
>            Assignee: Victor Wong
>            Priority: Minor
>
> In
> {code:java}
> org.apache.flink.runtime.rest.RestClientTest#testConnectionTimeout
> {code}
> , we use a "unroutableIp" with a value of  "10.255.255.1" for test.
> But sometimes this IP is reachable in a private network of a company, which 
> is the case for me. As a result, this test failed with a following exception: 
>  
> {code:java}
> java.lang.AssertionError: Expected: an instance of 
> org.apache.flink.shaded.netty4.io.netty.channel.ConnectTimeoutException but: 
> <org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException:
>  Connection refused: /10.255.255.1:80> is a 
> org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException
>  at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20) at 
> org.junit.Assert.assertThat(Assert.java:956) at 
> org.junit.Assert.assertThat(Assert.java:923) at 
> org.apache.flink.runtime.rest.RestClientTest.testConnectionTimeout(RestClientTest.java:76)
>  ...
> {code}
>  
>  
> Can we change the `unroutableIp` to a reserved IP address, i.e "240.0.0.0", 
> which is described as  _Reserved for future use_ in 
> ([https://en.wikipedia.org/wiki/Reserved_IP_addresses])
> Or change the assertion? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to