Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-12646

Use reserved IP as unrouteable IP in RestClientTest

    XMLWordPrintableJSON

Details

    Description

      In

      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 

      Or change the assertion? 

      Attachments

        Issue Links

          Activity

            People

              victor-wong jiasheng55
              victor-wong jiasheng55
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m