소스 검색

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]