liip / LiipTestFixturesBundle

This bundles enables efficient loading of Doctrine fixtures in functional test-cases for Symfony applications
https://liip.ch
MIT License
165 stars 45 forks source link

[3.x] chore: remove backup #289

Closed alexislefebvre closed 5 months ago

alexislefebvre commented 5 months ago

See:

jrjohnson commented 3 months ago

@alexislefebvre removing the SqliteDatabaseBackup.php makes our tests at least 10x slower. It appeared to be working before, was it just the MySQL backup that wasn't? Would you be willing to restore this functionality (I can do the PR if needed) or is there another configuration option we should be setting to avoid needed to build the Sqlite database with every test?

alexislefebvre commented 3 months ago

@jrjohnson Thanks for the feedback. Is it fixtures loading and/or the tests execution that is 10x slower?

You can revert to 2.9.0 to avoid this issue while we assess the situation.

To avoid creating the schema with every test: use the keep_database_and_schema: true option: https://github.com/liip/LiipTestFixturesBundle/blob/3.x/doc/configuration.md

jrjohnson commented 3 months ago

I'm not sure what is causing the slowdown, I'm just looking at a test run that has been running for almost 3 hours and is less than half way done. The only change was upgrading and removing that config. We'd generally expect all tests to run in less than an hour, for comparison this one, also from this morning took 55 minutes.

I'll try adding the keep_database_and_schema option next, but I don't want to interrupt this run until it completes so we can a full time to finish.

jrjohnson commented 3 months ago

Just adding a note on progress: I'm unable to get test to run at all using the keep_database_and_schema: true option. I created the database and updated it as required in the docs, but I'll need to spend some time figuring out what is missing or not working. Still interested in restoring the previous caching functionality for sure if that's an option.

edhgoose commented 2 months ago

@alexislefebvre - just to echo what @jrjohnson said: we're keen to keep this functionality, it works seamlessly for us and has done for many years. Unfortunately our repo is private so I can't share details, but happy to help where we can.

mussbach commented 2 months ago

same here. Glad to hear that you work on bringing back SqliteDatabaseBackup or the like. Dama is no option for us as it has problems with nested transactions

alexislefebvre commented 2 months ago

Backups have been reverted on an alpha release, please see here to test it and give feedback:

alexislefebvre commented 1 month ago

A new stable release, that support backups, has been released: https://github.com/liip/LiipTestFixturesBundle/releases/tag/3.1.0

jrjohnson commented 1 month ago

Thanks @alexislefebvre, we updated, looks great!

edhgoose commented 1 month ago

Ditto, thank you @alexislefebvre. We've just merged it into our prod app.

Thanks!