-
Notifications
You must be signed in to change notification settings - Fork 2
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
Is the entity manager not released from memory after each unit test? #10
Comments
That error doesn't look like memory leak, PHP tries to allocate 140 terabytes in one go. |
140 TB? Well, maybe I should go and buy more RAM then... ;-) I now moved the first of the affected tests to functional suite, and the entire suite runs smoothly there. How can that be?? What's the difference between unit and functional runner? It probably has something to do with a change I made in the app in an entity: Some setter is now doing a change in a related entity, something like: function setOk(bool $ok)
{
$this->ok = $ok;
$this->getFoo()->setOk($ok); // <= `Foo` = related entity
} Cause when I remove this line again, unit suite works too (i.e. fails, but doesn't crash). |
When running my entire unit test suite, I'm getting one of these two errors
... always on the same tests. The only thing they have in common is that they fetch stuff from the database.
But when I run the affected test files alone, everything's fine.
This makes me suspect that something with memory management is wrong. Is the entity manager being kept in memory between test runs?
The text was updated successfully, but these errors were encountered: