mumrah commented on a change in pull request #9294: URL: https://github.com/apache/kafka/pull/9294#discussion_r490861713
########## File path: clients/src/test/java/org/apache/kafka/clients/ClusterConnectionStatesTest.java ########## @@ -273,22 +273,21 @@ public void testMultipleIPsWithDefault() throws UnknownHostException { @Test public void testMultipleIPsWithUseAll() throws UnknownHostException { - assertEquals(2, ClientUtils.resolve(hostTwoIps, ClientDnsLookup.USE_ALL_DNS_IPS).size()); + assertTrue(ClientUtils.resolve(hostTwoIps, ClientDnsLookup.USE_ALL_DNS_IPS).size() > 1); connectionStates.connecting(nodeId1, time.milliseconds(), hostTwoIps, ClientDnsLookup.USE_ALL_DNS_IPS); InetAddress addr1 = connectionStates.currentAddress(nodeId1); connectionStates.connecting(nodeId1, time.milliseconds(), hostTwoIps, ClientDnsLookup.USE_ALL_DNS_IPS); InetAddress addr2 = connectionStates.currentAddress(nodeId1); assertNotSame(addr1, addr2); - connectionStates.connecting(nodeId1, time.milliseconds(), hostTwoIps, ClientDnsLookup.USE_ALL_DNS_IPS); InetAddress addr3 = connectionStates.currentAddress(nodeId1); - assertSame(addr1, addr3); Review comment: Thanks for clarifying, @ijuma. Seems like we could verify the round-robin behavior without relying on specific number of IPs. ---------------------------------------------------------------- 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: us...@infra.apache.org