MINOR: Fix testResolveDnsLookupResolveCanonicalBootstrapServers (#11180)
`testResolveDnsLookupResolveCanonicalBootstrapServers` added in
#11091 treats the result from
`ClientUtils.resolve(...,
ClientDnsLookup.RESOLVE_CANONICAL_BOOTSTRAP_SERVERS_ONLY. ...)` as if
it should differ from `ClientUtils.resolve(...,
ClientDnsLookup.DEFAULT, ...)`, but the branching in resolve is on
`ClientDnsLookup.USE_ALL_DNS_IPS == clientDnsLookup` -- everything else
gets a single result.
Reviewers: Ismael Juma <ismael@juma.me.uk>
diff --git a/clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java b/clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java
index 51a45a0..f6043f0 100644
--- a/clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java
+++ b/clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java
@@ -114,7 +114,7 @@
@Test
public void testResolveDnsLookupResolveCanonicalBootstrapServers() throws UnknownHostException {
- assertEquals(2, resolveToTwoIps(ClientDnsLookup.RESOLVE_CANONICAL_BOOTSTRAP_SERVERS_ONLY).size());
+ assertEquals(1, resolveToTwoIps(ClientDnsLookup.RESOLVE_CANONICAL_BOOTSTRAP_SERVERS_ONLY).size());
}
private List<InetAddress> resolveToTwoIps(ClientDnsLookup dnsLookup) throws UnknownHostException {