[Zodb-checkins] CVS: ZODB3/BTrees/tests - testBTrees.py:1.51.10.3

Tim Peters tim.one at comcast.net
Mon Jul 7 15:57:35 EDT 2003


Update of /cvs-repository/ZODB3/BTrees/tests
In directory cvs.zope.org:/tmp/cvs-serv32102/BTrees/tests

Modified Files:
      Tag: zodb33-devel-branch
	testBTrees.py 
Log Message:
Rehabilitate testLoadAndStore() and testGhostUnghost():  the seeming
infinite loops they get into go away after removing the cache_size=1
argument to _getRoot()'s call of DB.  That argument was picked up from
the ZODB4 flavor of _getRoot().  I don't know why this differed between
ZODB3 and ZODB4, or why cache_size=1 creates problems here.


=== ZODB3/BTrees/tests/testBTrees.py 1.51.10.2 => 1.51.10.3 ===
--- ZODB3/BTrees/tests/testBTrees.py:1.51.10.2	Mon Jul  7 14:31:28 2003
+++ ZODB3/BTrees/tests/testBTrees.py	Mon Jul  7 14:57:28 2003
@@ -37,14 +37,19 @@
 
     def _getRoot(self):
         if self.db is None:
-            self.db = DB(MappingStorage(), cache_size=1)
+            # XXX On the next line, the ZODB4 flavor of this routine
+            # XXX passes a cache_size argument:
+            #     self.db = DB(MappingStorage(), cache_size=1)
+            # XXX If that's done here, though, testLoadAndStore() and
+            # XXX testGhostUnghost() both nail the CPU and seemingly
+            # XXX never finish.
+            self.db = DB(MappingStorage())
         return self.db.open().root()
 
     def _closeRoot(self, root):
         root._p_jar.close()
 
-    # XXX Appears to be in an infinite loop.
-    def xxx_testLoadAndStore(self):
+    def testLoadAndStore(self):
         for i in 0, 10, 1000:
             t = self.t.__class__()
             self._populate(t, i)
@@ -62,8 +67,7 @@
             self._closeRoot(root)
             self._closeRoot(root2)
 
-    # XXX Appears to be in an infinite loop.
-    def xxx_testGhostUnghost(self):
+    def testGhostUnghost(self):
         for i in 0, 10, 1000:
             t = self.t.__class__()
             self._populate(t, i)




More information about the Zodb-checkins mailing list