[Zope-Checkins] CVS: ZODB3/ZODB/tests - testCache.py:1.13.10.4

Tim Peters tim.one at comcast.net
Wed May 19 13:24:59 EDT 2004


Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv17605/ZODB/tests

Modified Files:
      Tag: Zope-2_7-branch
	testCache.py 
Log Message:
checkFullSweep() and checkMinimize():  removed time.sleep(3) calls, and
a comment block explaining why the sleep calls are needed.  I have no
idea what they were about -- must be left over from some older cache
implementation, before my time.  There's nothing in the current
cPickleCache implementation that refuses to invalidate a thing based on
how long it's been in the cache.


=== ZODB3/ZODB/tests/testCache.py 1.13.10.3 => 1.13.10.4 ===
--- ZODB3/ZODB/tests/testCache.py:1.13.10.3	Mon May 10 12:07:26 2004
+++ ZODB3/ZODB/tests/testCache.py	Wed May 19 13:24:57 2004
@@ -94,22 +94,14 @@
     # XXX not really sure how to do a black box test of the cache.
     # should the full sweep and minimize calls always remove things?
 
-    # The sleep(3) call is based on the implementation of the cache.
-    # It's measures time in units of three seconds, so something used
-    # within the last three seconds looks like something that is
-    # currently being used.  Three seconds old is the youngest
-    # something can be and still be collected.
-
     def checkFullSweep(self):
         old_size = self.db.cacheSize()
-        time.sleep(3)
         self.db.cacheFullSweep(0)
         new_size = self.db.cacheSize()
         self.assert_(new_size < old_size, "%s < %s" % (old_size, new_size))
 
     def checkMinimize(self):
         old_size = self.db.cacheSize()
-        time.sleep(3)
         self.db.cacheMinimize(0)
         new_size = self.db.cacheSize()
         self.assert_(new_size < old_size, "%s < %s" % (old_size, new_size))




More information about the Zope-Checkins mailing list