Skip to content

Commit

Permalink
Call gc.collect() explicitly to banish the ghosts who are no longer i…
Browse files Browse the repository at this point in the history
…n the ring.
  • Loading branch information
yuseitahara committed Nov 15, 2018
1 parent 000501d commit 7f34907
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions persistent/tests/test_picklecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@ def _p_deactivate(self):
self.assertEqual(cache.total_estimated_size, 64*100)

cache.incrgc()
gc.collect() # banish the ghosts who are no longer in the ring
self.assertEqual(cache.total_estimated_size, 64*6)
self.assertEqual(cache.cache_non_ghost_count, 6)
self.assertEqual(len(cache), 6)
Expand Down

0 comments on commit 7f34907

Please sign in to comment.