Преглед изворни кода

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 <[email protected]>
Ian Campbell пре 9 година
родитељ
комит
5cdf30fc12
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      tests/integration/resilience_test.py

+ 5 - 0
tests/integration/resilience_test.py

@@ -20,6 +20,11 @@ class ResilienceTest(DockerClientTestCase):
         self.db.start_container(container)
         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):
         self.project.up(strategy=ConvergenceStrategy.always)
         container = self.db.containers()[0]