summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Araujo <asdaraujo@users.noreply.github.com>2017-12-05 09:47:38 -0800
committerDana Powers <dana.powers@gmail.com>2017-12-05 09:47:38 -0800
commit141b6b29609f9594ad9d3d3302a0123d1b831261 (patch)
tree759e924b346fb9c93fbc2239b89c1d93d786f9fa
parent27da91641750f190da305478759016398d076e51 (diff)
downloadkafka-python-141b6b29609f9594ad9d3d3302a0123d1b831261.tar.gz
Change fixture default host to localhost (#1305)
-rw-r--r--test/fixtures.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/test/fixtures.py b/test/fixtures.py
index 62a1980..661a631 100644
--- a/test/fixtures.py
+++ b/test/fixtures.py
@@ -191,22 +191,8 @@ class KafkaFixture(Fixture):
(host, port) = (parse.hostname, parse.port)
fixture = ExternalService(host, port)
else:
- # force IPv6 here because of a confusing point:
- #
- # - if the string "localhost" is passed, Kafka will *only* bind to the IPv4 address of localhost
- # (127.0.0.1); however, kafka-python will attempt to connect on ::1 and fail
- #
- # - if the address literal 127.0.0.1 is passed, the metadata request during bootstrap will return
- # the name "localhost" and we'll go back to the first case. This is odd!
- #
- # Ideally, Kafka would bind to all loopback addresses when we tell it to listen on "localhost" the
- # way it makes an IPv6 socket bound to both 0.0.0.0/0 and ::/0 when we tell it to bind to "" (that is
- # to say, when we make a listener of PLAINTEXT://:port.
- #
- # Note that even though we specify the bind host in bracket notation, Kafka responds to the bootstrap
- # metadata request without square brackets later.
if host is None:
- host = "[::1]"
+ host = "localhost"
fixture = KafkaFixture(host, port, broker_id,
zk_host, zk_port, zk_chroot,
transport=transport,