Skip to content

Free up LazySuite precache while getting tests#1030

Open
rtpg wants to merge 1 commit intonose-devs:masterfrom
rtpg:memory-leak
Open

Free up LazySuite precache while getting tests#1030
rtpg wants to merge 1 commit intonose-devs:masterfrom
rtpg:memory-leak

Conversation

@rtpg
Copy link
Copy Markdown

@rtpg rtpg commented Dec 15, 2016

LazySuite will, by default, keep a cache of tests that are being added to it. This cache never gets removed, so when running a very large test suite, older test cases do not get freed, causing memory pressure over the long term.

This patch instead removes elements from the cache as they get read. Since the test are supposed to be iterated over just once, I believe this does not change the outward spec of this class, even if internal details have changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant