Simplify ZooKeeper client initialization
The ZooKeeperClient now provides a fromConfig() method that parses all necessary configuration values to instantiate a ZooKeeperClient. Previously, this needed to be done in every component to initialize the connection to ZooKeeper. Change-Id: I5fa4ddab5f85c658291f1262ee0392a60086846e
This commit is contained in:
committed by
James E. Blair
parent
24405c9c74
commit
b4d8a4e74b
@@ -31,9 +31,9 @@ class TestNodepoolIntegration(BaseTestCase):
|
||||
super(TestNodepoolIntegration, self).setUp()
|
||||
|
||||
self.statsd = None
|
||||
self.zk_client = zuul.zk.ZooKeeperClient()
|
||||
self.zk_client = zuul.zk.ZooKeeperClient('localhost:2181')
|
||||
self.addCleanup(self.zk_client.disconnect)
|
||||
self.zk_client.connect('localhost:2181')
|
||||
self.zk_client.connect()
|
||||
self.hostname = socket.gethostname()
|
||||
|
||||
self.provisioned_requests = []
|
||||
|
||||
Reference in New Issue
Block a user