[Zodb-checkins] SVN: ZODB/branches/3.4/src/Z ZEO/tests/zeoserver.py, log(): repair broken interface

Tim Peters tim.one at comcast.net
Thu May 12 11:51:04 EDT 2005


Log message for revision 30339:
  ZEO/tests/zeoserver.py, log():  repair broken interface
  between old logging code and the use of Python's logging
  package.
  
  ZODB/tests/TransactionalUndoStorage.py, _exercise_info_indices():
  Jeez Louise, the new tests I added for undoInfo+undoLog work fine
  in ZODB, but break the ZRS tests(!).  They close the DB "too soon",
  and in one of the ZRS scenarios that leaves a recovering secondary
  without a primary to recover from.
  

Changed:
  U   ZODB/branches/3.4/src/ZEO/tests/zeoserver.py
  U   ZODB/branches/3.4/src/ZODB/tests/TransactionalUndoStorage.py

-=-
Modified: ZODB/branches/3.4/src/ZEO/tests/zeoserver.py
===================================================================
--- ZODB/branches/3.4/src/ZEO/tests/zeoserver.py	2005-05-12 15:13:53 UTC (rev 30338)
+++ ZODB/branches/3.4/src/ZEO/tests/zeoserver.py	2005-05-12 15:51:04 UTC (rev 30339)
@@ -43,7 +43,7 @@
 
 def log(label, msg, *args):
     message = "(%s) %s" % (label, msg)
-    logger.debug(message, args)
+    logger.debug(message, *args)
 
 
 class ZEOTestServer(asyncore.dispatcher):

Modified: ZODB/branches/3.4/src/ZODB/tests/TransactionalUndoStorage.py
===================================================================
--- ZODB/branches/3.4/src/ZODB/tests/TransactionalUndoStorage.py	2005-05-12 15:13:53 UTC (rev 30338)
+++ ZODB/branches/3.4/src/ZODB/tests/TransactionalUndoStorage.py	2005-05-12 15:51:04 UTC (rev 30339)
@@ -773,7 +773,11 @@
         self.assertEqual(oddball, redundant)
 
         cn.close()
-        db.close()
+        # Caution:  don't close db; the framework does that.  If you close
+        # it here, the ZODB tests still work, but the ZRS RecoveryStorageTests
+        # fail (closing the DB here in those tests closes the ZRS primary
+        # before a ZRS secondary even starts, and then the latter can't
+        # find a server to recover from).
 
     def checkIndicesInUndoInfo(self):
         self._exercise_info_indices("undoInfo")



More information about the Zodb-checkins mailing list