-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Codeception: memory leak. #264
Comments
I noticed the same thing, while it would not run out of memory due to a fairly high memory limit, the test suite would slow down exponentially to a point where 223 tests would take over 40 minutes to complete (before the upgrade it would take about 20-25 seconds). A blackfire profile run showed that As a workaround I disabled the AuditorBundle for the test environment. |
Thanks @Legion112 @Liiva for the report. I'll have a look at it asap (very busy lately). |
@DamienHarper Any chance you had a chance to look at this? I ran into the same problem. Codeception uses a shared memory for all functional tests (https://codeception.com/docs/04-FunctionalTests#shared-memory). This was never a problem and I could run ~500 tests, which used about 300 MB. |
@Legion112 @Liiva @Siegii As I do not use Codeception, would you mind providing a complete code sample (as a GitHub repo for example) that reproduce the issue? This would greatly help |
Any update on this? |
auditor-bundle
versionSummary
Memory leak when running Codeception test.
Current behavior
After running several tests the test fails on memory exhausted.
Error
My assumption the
damienharper/auditor/src/Provider/Doctrine/Auditing/Logger/LoggerChain
keep track of all queries in memory and does not clear it between tests.All tests surrounded by the transaction which rolls back after test completion to keep the database clean between tests (I think it is important to notice).
How to reproduce
Try to use Symfony with codeception and write a bunch of tests what write to the database.
Expected behavior
The codeception test do not make memory leak.
The text was updated successfully, but these errors were encountered: