Commit 04efaecc authored by Jim Fulton's avatar Jim Fulton

Added gc.collect() calls to avoid spurious test failures

parent 03b81838
......@@ -330,7 +330,7 @@ resources (like RDB connections), for the duration.
>>> st = Storage()
>>> db = DB(st, pool_size=2)
>>> conn0 = db.open()
>>> conn0.cacheMinimize() # See fix84.rst
>>> conn0.cacheMinimize(); import gc; _ = gc.collect() # See fix84.rst
>>> len(conn0._cache) # empty now
0
>>> import transaction
......
......@@ -444,7 +444,7 @@ def test_basic_cache_size_estimation():
>>> import ZODB.MappingStorage
>>> db = ZODB.MappingStorage.DB()
>>> conn = db.open()
>>> conn.cacheMinimize() # See fix84.rst
>>> conn.cacheMinimize(); _ = gc.collect() # See fix84.rst
>>> def check_cache_size(cache, expected):
... actual = cache.total_estimated_size
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment