diff options
author | Omar Ghishan <omar.ghishan@rd.io> | 2014-01-07 17:54:05 -0800 |
---|---|---|
committer | Omar Ghishan <omar.ghishan@rd.io> | 2014-01-07 17:54:05 -0800 |
commit | 9cbe45d2358d563bb2844eecaa545e7f6d0a6629 (patch) | |
tree | 097df10a5a3e65e98a3e9c86c272f2ab465c9180 | |
parent | f333e9154d89a28aebf021b0776f42c653cffeb3 (diff) | |
download | kafka-python-9cbe45d2358d563bb2844eecaa545e7f6d0a6629.tar.gz |
Some cleanup and easier to read test fixture output
-rw-r--r-- | test/fixtures.py | 8 | ||||
-rw-r--r-- | test/test_integration.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/fixtures.py b/test/fixtures.py index 28d6519..9e283d3 100644 --- a/test/fixtures.py +++ b/test/fixtures.py @@ -209,11 +209,11 @@ class ZookeeperFixture(object): self.child = None def out(self, message): - print("*** Zookeeper[%s]: %s" % (id(self), message)) + print("*** Zookeeper [%s:%d]: %s" % (self.host, self.port, message)) def open(self): self.tmp_dir = tempfile.mkdtemp() - print("*** [%s] Running local Zookeeper instance..." % id(self)) + self.out("Running local instance...") print(" host = %s" % self.host) print(" port = %s" % self.port) print(" tmp_dir = %s" % self.tmp_dir) @@ -278,7 +278,7 @@ class KafkaFixture(object): self.running = False def out(self, message): - print("*** Kafka[%s]: %s" % (id(self), message)) + print("*** Kafka [%s:%d]: %s" % (self.host, self.port, message)) def open(self): if self.running: @@ -286,7 +286,7 @@ class KafkaFixture(object): return self.tmp_dir = tempfile.mkdtemp() - self.out("Running local instance") + self.out("Running local instance...") print(" host = %s" % self.host) print(" port = %s" % self.port) print(" broker_id = %s" % self.broker_id) diff --git a/test/test_integration.py b/test/test_integration.py index ccf9990..eaf432d 100644 --- a/test/test_integration.py +++ b/test/test_integration.py @@ -8,7 +8,7 @@ import random from kafka import * # noqa from kafka.common import * # noqa from kafka.codec import has_gzip, has_snappy -from kafka.consumer import FETCH_BUFFER_SIZE_BYTES, MAX_FETCH_BUFFER_SIZE_BYTES +from kafka.consumer import MAX_FETCH_BUFFER_SIZE_BYTES from .fixtures import ZookeeperFixture, KafkaFixture |