You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ij...@apache.org on 2021/08/06 23:12:00 UTC
[kafka] branch 2.5 updated: MINOR: Fix
testResolveDnsLookupResolveCanonicalBootstrapServers (#11180)
This is an automated email from the ASF dual-hosted git repository.
ijuma pushed a commit to branch 2.5
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.5 by this push:
new 2bd2a05 MINOR: Fix testResolveDnsLookupResolveCanonicalBootstrapServers (#11180)
2bd2a05 is described below
commit 2bd2a05dfc7611d5fb4253f07db42a4dafefe502
Author: Shay Elkin <20...@users.noreply.github.com>
AuthorDate: Fri Aug 6 16:10:35 2021 -0700
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 <is...@juma.me.uk>
---
clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 @@ public class ClientUtilsTest {
@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 {