From a1f2ca827ca41ad55caad429b2d9e3b024f8bca6 Mon Sep 17 00:00:00 2001
From: Jeremy Hylton <jeremy@svn.zope.org>
Date: Mon, 16 Jun 2003 18:18:41 +0000
Subject: [PATCH] Be more thorough about deleting ZEC files.

---
 src/ZEO/tests/ConnectionTests.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/ZEO/tests/ConnectionTests.py b/src/ZEO/tests/ConnectionTests.py
index fc6ce831..206709d4 100644
--- a/src/ZEO/tests/ConnectionTests.py
+++ b/src/ZEO/tests/ConnectionTests.py
@@ -86,6 +86,7 @@ class CommonSetupTearDown(StorageTestBase):
         self._pids = []
         self._servers = []
         self.conf_paths = []
+        self.caches = []
         self._newAddr()
         self.startServer()
 
@@ -105,13 +106,11 @@ class CommonSetupTearDown(StorageTestBase):
             # Not in Windows Python until 2.3
             for pid in self._pids:
                 os.waitpid(pid, 0)
-        for i in 0, 1:
-            path = "c1-test-%d.zec" % i
-            if os.path.exists(path):
-                try:
+        for c in self.caches:
+            for i in 0, 1:
+                path = "c1-test-%d.zec" % i
+                if os.path.exists(path):
                     os.unlink(path)
-                except os.error:
-                    pass
         self.__super_tearDown()
 
     def _newAddr(self):
@@ -127,6 +126,7 @@ class CommonSetupTearDown(StorageTestBase):
     def openClientStorage(self, cache='', cache_size=200000, wait=1,
                           read_only=0, read_only_fallback=0,
                           username=None, password=None, realm=None):
+        self.caches.append(cache)
         storage = TestClientStorage(self.addr,
                                     client=cache,
                                     cache_size=cache_size,
-- 
2.30.9