[Zodb-checkins] SVN: ZODB/branches/3.3/src/ZEO/tests/test_cache.py
setUp(): Use a much smaller (than default) ZEO client cache.
Tim Peters
tim.one at comcast.net
Thu Feb 17 16:15:52 EST 2005
Log message for revision 29194:
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/branches/3.3/src/ZEO/tests/test_cache.py
-=-
Modified: ZODB/branches/3.3/src/ZEO/tests/test_cache.py
===================================================================
--- ZODB/branches/3.3/src/ZEO/tests/test_cache.py 2005-02-17 21:10:53 UTC (rev 29193)
+++ ZODB/branches/3.3/src/ZEO/tests/test_cache.py 2005-02-17 21:15:51 UTC (rev 29194)
@@ -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