[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/tests/testCache.py checkFullSweep() and checkMinimize(): removed time.sleep(3) calls, and a comment block explaining

Tim Peters tim.one at comcast.net
Wed May 19 16:30:21 EDT 2004


Log message for revision 24832:
checkFullSweep() and checkMinimize():  removed time.sleep(3) calls, and a comment block explaining
why the sleeps are needed.  The explanation (and the
sleeps) didn't make sense -- must be left over
from a cache implementation before my time.


-=-
Modified: ZODB/trunk/src/ZODB/tests/testCache.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/testCache.py	2004-05-19 18:40:01 UTC (rev 24831)
+++ ZODB/trunk/src/ZODB/tests/testCache.py	2004-05-19 20:30:20 UTC (rev 24832)
@@ -93,22 +93,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()
         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()
         new_size = self.db.cacheSize()
         self.assert_(new_size < old_size, "%s < %s" % (old_size, new_size))




More information about the Zodb-checkins mailing list