[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/test_cache.py Merge rev 29194 from 3.3 branch.

Tim Peters tim.one at comcast.net
Thu Feb 17 16:17:44 EST 2005


Log message for revision 29195:
  Merge rev 29194 from 3.3 branch.
  
  setUp():  Use a much smaller (than default) ZEO client cache.
  
  The current default is 200MB, and at least testSerialization reads
  the entire cache file into one giant string.  That grossly boosts
  the process highwater mark when running the tests.  Windows reclaims
  the memory after, but other platforms may not.
  
  Cool:  testSerialization was one of the slowest tests before, but
  is 100x faster now.
  

Changed:
  U   ZODB/trunk/src/ZEO/tests/test_cache.py

-=-
Modified: ZODB/trunk/src/ZEO/tests/test_cache.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/test_cache.py	2005-02-17 21:15:51 UTC (rev 29194)
+++ ZODB/trunk/src/ZEO/tests/test_cache.py	2005-02-17 21:17:43 UTC (rev 29195)
@@ -29,7 +29,10 @@
 class CacheTests(unittest.TestCase):
 
     def setUp(self):
-        self.cache = ZEO.cache.ClientCache()
+        # The default cache size is much larger than we need here.  Since
+        # testSerialization reads the entire file into a string, it's not
+        # good to leave it that big.
+        self.cache = ZEO.cache.ClientCache(size=1024**2)
         self.cache.open()
 
     def tearDown(self):



More information about the Zodb-checkins mailing list