-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Error with DAMA + reset mode migrate + global story #538
Comments
Hi! global state + dama + I'm wondering if this is not the same problem than here: #534 (I'm running postgres, so it could be kinda the same problem, but with different errors) Do you have the problem without using |
We need to update the CI to allow/test with DAMA 8. Did you see this note? https://github.com/dmaicher/doctrine-test-bundle?tab=readme-ov-file#troubleshooting |
I have not tried to run tests without
Yeah I've checked all of it. Sadly it didn't help me much and the only viable solution for me was to manually execute stories (which is not a pain at all, it is fine, but could be prevented). |
I don't understand this statement 🤔 |
I mean yes you can, but according to this piece of documentation on Symfony's website, the main goal of using DAMA and Foundry together is to speed up the
|
Maybe this part of the docs needs a reword: dama improves performance in both reset modes, since you only have to reset your db once. But it might improve drastically for migration mode, because migration mode is really slower than |
Alright ! Thank you for the advice, just tested using |
ok then, we've found the culprit: we actually have a problem with dama + reset_mode=migrate + global story @kbond I think we actually must add a full CI permutation with this case |
I can confirm I have the same issue:
In the migrations of course I have ALTER statements etc. So I kind of expect in the Foundry's database resetter to exists something that will disable DAMA and enable it after migrations take place. I can provide a reproducer and an example and I want to work on a fix if possible but I dont know where to start. I think I somehow need to disable the DAMA in the |
I found the solution the issue is not in foundry or the database resetter. This is because I forgot to add this to my migrations:
I think this makes doctrine migrations to always commit a transaction and that breaks DAMA. |
Ah, glad you found a solution - I've been burned by this before as well. We should perhaps make a note in the docs. |
Hello there !
Context
I've created a
Story
because I need it for several test cases. In order to ease the usage, I've chosen to load theStory
using theglobal_state
configuration like so :Issue
After installing DAMA, and switched
reset_mode
tomigrate
, I started having these errors :Removing the
global_state
to replace it with manual story loading in test usingMyStory::load()
does work. Also, I want to add the fact that myStory
does only produce creations. It doesn't explicitly produce any of the statements that generate implicit commits according to MySQL documentation.Solution
Sadly I didn't send any time yet searching for clues on the topic. Is it a bad usage from me ?
If you have any question, I'm here to help you asap 👍
Thank you guys !
The text was updated successfully, but these errors were encountered: