[Zope-Checkins] CVS: ZODB3/ZEO/tests - ConnectionTests.py:1.40.2.4

Jeremy Hylton jeremy at zope.com
Fri Sep 5 17:20:34 EDT 2003


Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv1047/ZEO/tests

Modified Files:
      Tag: ZODB3-3_2-branch
	ConnectionTests.py 
Log Message:
Give every cache a unique id to avoid accidental sharing.

This seems easier than forcing the client to provide an extra argument
for the cases where sharing is possible.  (It's perplexing when you
forget the extra argument.)


=== ZODB3/ZEO/tests/ConnectionTests.py 1.40.2.3 => 1.40.2.4 ===
--- ZODB3/ZEO/tests/ConnectionTests.py:1.40.2.3	Wed Aug  6 12:29:12 2003
+++ ZODB3/ZEO/tests/ConnectionTests.py	Fri Sep  5 16:20:33 2003
@@ -141,9 +141,14 @@
     def getConfig(self, path, create, read_only):
         raise NotImplementedError
 
-    def openClientStorage(self, cache='', cache_size=200000, wait=1,
+    cache_id = 1
+
+    def openClientStorage(self, cache=None, cache_size=200000, wait=1,
                           read_only=0, read_only_fallback=0,
                           username=None, password=None, realm=None):
+        if cache is None:
+            cache = str(self.__class__.cache_id)
+            self.__class__.cache_id += 1
         self.caches.append(cache)
         storage = TestClientStorage(self.addr,
                                     client=cache,




More information about the Zope-Checkins mailing list