-
Notifications
You must be signed in to change notification settings - Fork 182
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
Database Backup not working properly - metadata changes in between #422
Comments
I ran the test |
I'm feeling the same but I'm currently failing to identify why. I'm often loading no fixtures through |
@magnetik Can we close this issue? |
I'm using 2.0x branch extensively and I did not noticed this, so unless @olivermack still face it I think it can be closed. |
I'm closing this issue for now. Feel free to reopen it if the problem is not solved. |
@alexislefebvre I've just tested it again and I'm still facing the described issues...
My fixtures are indeed |
Ah, maybe I found something... In some of my fixtures I'm using an |
Yeah, ok, that was the issue indeed... Most of my entities have an annotation-mapping defined like this:
In some of my fixtures I wanted to have a couple of items with predefined UUIDs, this I have something like this in the beginning of my fixture:
Because of the fact that the fixtures are executed on a non-existent cache, the fixture's
Sorry for the confusion, it was actually my fault - but indeed tricky to find ;). Best |
Thanks for the detailed information. This could be interesting to document this in https://github.com/liip/LiipTestFixturesBundle/blob/master/doc/database.md or https://github.com/liip/LiipTestFixturesBundle/blob/master/doc/caveats.md |
I'm using
2.0.0-alpha4
with SQlite database tests. It seems as if the creation of the filename is inconsistent during test execution.Given I'm running a single test with a single call to
loadFixtures()
with a single fixture on empty cache I can see that the result of\Liip\FunctionalTestBundle\Services\DatabaseBackup\SqliteDatabaseBackup::getBackupFilePath
differs inisBackupActual()
frombackup()
, thus he's checking a file that he won't write. I can imagine this is due to the way how the\Liip\FunctionalTestBundle\Services\DatabaseTools\AbstractDatabaseTool::getMetadatas()
loads the metadata in contrast to the way how Doctrine is doing it under the hood.In fact I've dumped the hashes multiple times and it changes indeed. Actually I was only able to get the backup+restore procedure running when changing the
\Liip\FunctionalTestBundle\Services\DatabaseBackup\SqliteDatabaseBackup::getBackupFilePath()
to hash only theserialize($this->classNames)
, without the metadata.Is this reproducible for someone?
Best
The text was updated successfully, but these errors were encountered: