zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afine <...@git.apache.org>
Subject [GitHub] zookeeper pull request #451: ZOOKEEPER-2184: Zookeeper Client should re-reso...
Date Mon, 05 Feb 2018 20:42:50 GMT
Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/451#discussion_r166105622
  
    --- Diff: src/java/test/org/apache/zookeeper/test/StaticHostProviderTest.java ---
    @@ -117,8 +116,32 @@ public void testTwoInvalidHostAddresses() {
             list.add(new InetSocketAddress("a", 2181));
             list.add(new InetSocketAddress("b", 2181));
             new StaticHostProvider(list);
    +	}
    +
    +    @Test
    +    public void testReResolving() {
    +        byte size = 1;
    +        ArrayList<InetSocketAddress> list = new ArrayList<InetSocketAddress>(size);
    +
    +        // Test a hostname that resolves to multiple addresses
    +        list.add(InetSocketAddress.createUnresolved("www.apache.org", 1234));
    --- End diff --
    
    I'm wondering if it's possible to mock this out? It would be great if our unit tests were
not dependent on some other infrastructure.


---

Mime
View raw message