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. ...@@ -330,7 +330,7 @@ resources (like RDB connections), for the duration.
>>> st = Storage() >>> st = Storage()
>>> db = DB(st, pool_size=2) >>> db = DB(st, pool_size=2)
>>> conn0 = db.open() >>> conn0 = db.open()
>>> conn0.cacheMinimize() # See fix84.rst >>> conn0.cacheMinimize(); import gc; _ = gc.collect() # See fix84.rst
>>> len(conn0._cache) # empty now >>> len(conn0._cache) # empty now
0 0
>>> import transaction >>> import transaction
......
...@@ -444,7 +444,7 @@ def test_basic_cache_size_estimation(): ...@@ -444,7 +444,7 @@ def test_basic_cache_size_estimation():
>>> import ZODB.MappingStorage >>> import ZODB.MappingStorage
>>> db = ZODB.MappingStorage.DB() >>> db = ZODB.MappingStorage.DB()
>>> conn = db.open() >>> conn = db.open()
>>> conn.cacheMinimize() # See fix84.rst >>> conn.cacheMinimize(); _ = gc.collect() # See fix84.rst
>>> def check_cache_size(cache, expected): >>> def check_cache_size(cache, expected):
... actual = cache.total_estimated_size ... 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