summaryrefslogtreecommitdiff
path: root/kazoo/testing/harness.py
diff options
context:
space:
mode:
authorStephen Sorriaux <stephen.sorriaux@gmail.com>2023-04-10 17:13:59 -0400
committerStephen Sorriaux <stephen.sorriaux@gmail.com>2023-04-24 14:04:44 -0400
commit2c36d699fbf0569f490d5bfa66fa85fbdc68dea3 (patch)
tree931d2caa9ec9f59ea167f78530fc484fe103e74b /kazoo/testing/harness.py
parentd218dc970575f5d6042c14060d36e118a8c92e57 (diff)
downloadkazoo-master.tar.gz
feat(testing): add more logging during test suiteHEADmaster
Activate `pytest`'s `logcli` setting to better read the client lifecycle during testing. Add `log()` function to KazooTestHarness class so that it is possible to log like crazy when something is not working Display the ZK client port in logs when starting a ZK server (useful for test "debug") Be able to get more than the last 100 lines of ZK logs (can be useful, believe me)
Diffstat (limited to 'kazoo/testing/harness.py')
-rw-r--r--kazoo/testing/harness.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/kazoo/testing/harness.py b/kazoo/testing/harness.py
index 880b1d9..d92a3fc 100644
--- a/kazoo/testing/harness.py
+++ b/kazoo/testing/harness.py
@@ -167,6 +167,9 @@ class KazooTestHarness(unittest.TestCase):
def cluster(self):
return get_global_cluster()
+ def log(self, level, msg, *args, **kwargs):
+ log.log(level, msg, *args, **kwargs)
+
@property
def servers(self):
return ",".join([s.address for s in self.cluster])