Commit 54eccb4b authored by Jeremy Hylton's avatar Jeremy Hylton

If multiple config files are created, make sure they are all deleted.

parent cc99508b
...@@ -85,15 +85,15 @@ class CommonSetupTearDown(StorageTestBase): ...@@ -85,15 +85,15 @@ class CommonSetupTearDown(StorageTestBase):
self.addr = [] self.addr = []
self._pids = [] self._pids = []
self._servers = [] self._servers = []
self.conf_path = None self.conf_paths = []
self._newAddr() self._newAddr()
self.startServer() self.startServer()
def tearDown(self): def tearDown(self):
"""Try to cause the tests to halt""" """Try to cause the tests to halt"""
zLOG.LOG("testZEO", zLOG.INFO, "tearDown() %s" % self.id()) zLOG.LOG("testZEO", zLOG.INFO, "tearDown() %s" % self.id())
if self.conf_path: for p in self.conf_paths:
os.remove(self.conf_path) os.remove(p)
if getattr(self, '_storage', None) is not None: if getattr(self, '_storage', None) is not None:
self._storage.close() self._storage.close()
if hasattr(self._storage, 'cleanup'): if hasattr(self._storage, 'cleanup'):
...@@ -163,7 +163,7 @@ class CommonSetupTearDown(StorageTestBase): ...@@ -163,7 +163,7 @@ class CommonSetupTearDown(StorageTestBase):
zeoport, adminaddr, pid, path = forker.start_zeo_server(sconf, zconf, zeoport, adminaddr, pid, path = forker.start_zeo_server(sconf, zconf,
addr[1], addr[1],
self.keep) self.keep)
self.conf_path = path self.conf_paths.append(path)
self._pids.append(pid) self._pids.append(pid)
self._servers.append(adminaddr) self._servers.append(adminaddr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment