Skip to content

Commit 9cbe45d

Browse files
committed
Some cleanup and easier to read test fixture output
1 parent f333e91 commit 9cbe45d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/fixtures.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ def __init__(self, host, port):
209209
self.child = None
210210

211211
def out(self, message):
212-
print("*** Zookeeper[%s]: %s" % (id(self), message))
212+
print("*** Zookeeper [%s:%d]: %s" % (self.host, self.port, message))
213213

214214
def open(self):
215215
self.tmp_dir = tempfile.mkdtemp()
216-
print("*** [%s] Running local Zookeeper instance..." % id(self))
216+
self.out("Running local instance...")
217217
print(" host = %s" % self.host)
218218
print(" port = %s" % self.port)
219219
print(" tmp_dir = %s" % self.tmp_dir)
@@ -278,15 +278,15 @@ def __init__(self, host, port, broker_id, zk_host, zk_port, zk_chroot, replicas=
278278
self.running = False
279279

280280
def out(self, message):
281-
print("*** Kafka[%s]: %s" % (id(self), message))
281+
print("*** Kafka [%s:%d]: %s" % (self.host, self.port, message))
282282

283283
def open(self):
284284
if self.running:
285285
self.out("Instance already running")
286286
return
287287

288288
self.tmp_dir = tempfile.mkdtemp()
289-
self.out("Running local instance")
289+
self.out("Running local instance...")
290290
print(" host = %s" % self.host)
291291
print(" port = %s" % self.port)
292292
print(" broker_id = %s" % self.broker_id)

test/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from kafka import * # noqa
99
from kafka.common import * # noqa
1010
from kafka.codec import has_gzip, has_snappy
11-
from kafka.consumer import FETCH_BUFFER_SIZE_BYTES, MAX_FETCH_BUFFER_SIZE_BYTES
11+
from kafka.consumer import MAX_FETCH_BUFFER_SIZE_BYTES
1212
from .fixtures import ZookeeperFixture, KafkaFixture
1313

1414

0 commit comments

Comments
 (0)