Cleanup zookeeper and fake nodepool in nodepool tests
The nodepool tests set up zookeeper connections and a fake nodepool. These test resources spawned threads that were leaking and causing subsequent tests to run with zookeeper and nodepool threads running. Clean that up. Change-Id: Ib799d4a40eb51e7bbe71673a082f345235c41019
This commit is contained in:
parent
f18e3b867e
commit
ffe8f8bb81
@ -31,6 +31,7 @@ class TestNodepoolIntegration(BaseTestCase):
|
||||
super(TestNodepoolIntegration, self).setUp()
|
||||
|
||||
self.zk = zuul.zk.ZooKeeper()
|
||||
self.addCleanup(self.zk.disconnect)
|
||||
self.zk.connect('localhost:2181')
|
||||
self.hostname = socket.gethostname()
|
||||
|
||||
|
@ -37,6 +37,7 @@ class TestNodepool(BaseTestCase):
|
||||
self.zk_chroot_fixture.zookeeper_chroot)
|
||||
|
||||
self.zk = zuul.zk.ZooKeeper()
|
||||
self.addCleanup(self.zk.disconnect)
|
||||
self.zk.connect(self.zk_config)
|
||||
self.hostname = 'nodepool-test-hostname'
|
||||
|
||||
@ -49,6 +50,7 @@ class TestNodepool(BaseTestCase):
|
||||
self.zk_chroot_fixture.zookeeper_host,
|
||||
self.zk_chroot_fixture.zookeeper_port,
|
||||
self.zk_chroot_fixture.zookeeper_chroot)
|
||||
self.addCleanup(self.fake_nodepool.stop)
|
||||
|
||||
def waitForRequests(self):
|
||||
# Wait until all requests are complete.
|
||||
|
Loading…
x
Reference in New Issue
Block a user