Skip to content

Commit

Permalink
Added gc.collect() calls to avoid spurious test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Jul 24, 2016
1 parent 03b8183 commit 04efaec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ZODB/tests/dbopen.txt
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ZODB/tests/testCache.py
Expand Up @@ -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
Expand Down

0 comments on commit 04efaec

Please sign in to comment.