jeudi 27 octobre 2016

Codeception Laravel5 Module Cleanup

I have been using Codeception 2.1.2 with the Db module to test my Laravel 5.1.35 for a while, using the Db module to handle database cleanup between tests. Because I have a significant amount of data setup that needs to occur, as the test suite has grown our tests have slowed down significantly.

I have recently upgraded to Codeception 2.2.6 and all tests work as I would expect. When I then remove the Db Module in favor of the Laravel5 module, tests run faster but get gradually slower and slower over the duration of the suite, where tests that take a second or two in isolation, may take upwards of minutes to complete when running the full suite.

It seems like there's a memory leak somewhere, either in my code or in the Laravel5 module itself, but it is incredibly difficult to pinpoint. I've tried removed all DB transactions in code to see if nested transactions were the cause, different versions of Codeception, different cleanup methods, like not using Laravel5 to clean up, but rather using a Seeder to clean up transactional data but have had no luck.

Any ideas or thoughts would be greatly appreciated.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire