Teardown project and db in ResilienceTest

These hold a reference to a docker.client.Client object and therefore a
connection pool which leaves fds open once the test has completed.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
Ian Campbell 2016-07-21 12:18:33 +01:00
parent 26b819ca67
commit 5cdf30fc12
1 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,11 @@ class ResilienceTest(DockerClientTestCase):
self.db.start_container(container) self.db.start_container(container)
self.host_path = container.get_mount('/var/db')['Source'] self.host_path = container.get_mount('/var/db')['Source']
def tearDown(self):
del self.project
del self.db
super(ResilienceTest, self).tearDown()
def test_successful_recreate(self): def test_successful_recreate(self):
self.project.up(strategy=ConvergenceStrategy.always) self.project.up(strategy=ConvergenceStrategy.always)
container = self.db.containers()[0] container = self.db.containers()[0]