liip / LiipFunctionalTestBundle

Some helper classes for writing functional tests in Symfony
http://liip.ch
MIT License
639 stars 182 forks source link

WebTestCase memory leak fix #582

Open shtumi opened 3 years ago

shtumi commented 3 years ago

There is memory leak in WebTestCase because method getContainer creates new kernel which is never shutdown. So in my project I was need more then 4Gb of memory to pass about 800 tests. After fix I need less then 300Mb.

This problem was discussed here: https://github.com/symfony/symfony/issues/35164

And also it was fixed in similar (but not exact) way inside LiipTestFixturesBundle: https://github.com/liip/LiipTestFixturesBundle/pull/62

alexislefebvre commented 3 years ago

Thanks! Please fix the issue reported by StyleCI.

alexislefebvre commented 3 years ago

@shtumi could you please rebase the PR and fix the error reported by StyleCI?

shtumi commented 3 years ago

really currently code of WebTestCase is changed a lot and I'm really not sure that problem is still exists and if exists, then then it's more easy to take new fork, investigate the problem and give new solution.