[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.73.2.7.2.10
Guido van Rossum
guido@python.org
Tue, 17 Dec 2002 17:13:08 -0500
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv28683
Modified Files:
Tag: ZODB3-fast-restart-branch
ClientStorage.py
Log Message:
Give verify_cache() a return value, for the benefit of unit tests.
=== ZODB3/ZEO/ClientStorage.py 1.73.2.7.2.9 => 1.73.2.7.2.10 ===
--- ZODB3/ZEO/ClientStorage.py:1.73.2.7.2.9 Tue Dec 17 17:11:25 2002
+++ ZODB3/ZEO/ClientStorage.py Tue Dec 17 17:13:07 2002
@@ -392,7 +392,11 @@
return self._server_addr
def verify_cache(self, server):
- """Internal routine called to verify the cache."""
+ """Internal routine called to verify the cache.
+
+ The return value (indicating which path we took) is used by
+ the test suite.
+ """
last_inval_tid = self._cache.getLastTid()
if last_inval_tid is not None:
ltid = server.lastTransaction()
@@ -400,7 +404,7 @@
log2(INFO, "No verification necessary "
"(last_inval_tid up-to-date)")
self._cache.open()
- return # No need to verify the cache
+ return "no verification"
# log some hints about last transaction
log2(INFO, "last inval tid: %r %s"
@@ -412,7 +416,7 @@
log2(INFO, "Recovering %d invalidations" % len(pair[1]))
self._cache.open()
self.invalidateTransaction(*pair)
- return
+ return "quick verification"
log2(INFO, "Verifying cache")
# setup tempfile to hold zeoVerify results
@@ -422,6 +426,7 @@
self._cache.verify(server.zeoVerify)
server.endZeoVerify()
+ return "full verification"
### Is there a race condition between notifyConnected and
### notifyDisconnected? In Particular, what if we get