You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/10/21 03:18:21 UTC

[GitHub] [zookeeper] ctubbsii commented on a change in pull request #1511: ZOOKEEPER-3981: Flaky test MultipleAddressTest::testGetValidAddressWithNotValid

ctubbsii commented on a change in pull request #1511:
URL: https://github.com/apache/zookeeper/pull/1511#discussion_r508964280



##########
File path: zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/MultipleAddressesTest.java
##########
@@ -110,7 +110,7 @@ public void testGetValidAddress() throws NoRouteToHostException {
     @Test
     public void testGetValidAddressWithNotValid() {
         assertThrows(NoRouteToHostException.class, () -> {
-            MultipleAddresses multipleAddresses = new MultipleAddresses(new InetSocketAddress("10.0.0.1", 22));
+            MultipleAddresses multipleAddresses = new MultipleAddresses(new InetSocketAddress("240.0.0.0", 22));

Review comment:
       Several blocks are reserved specifically for documentation/examples, and should never be routable, according to [RFC 5737](https://tools.ietf.org/html/rfc5737). I would pick from one of those, rather than one that might be reserved for some other, routable, purpose in future: `203.0.113.1` should work.
   ```suggestion
               // IP chosen because it is reserved for documentation/examples and should be unreachable (RFC 5737)
               MultipleAddresses multipleAddresses = new MultipleAddresses(new InetSocketAddress("203.0.113.1", 22));
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org