-
Notifications
You must be signed in to change notification settings - Fork 41
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
Record does not get deleted in on_exit callback #49
Comments
Are you sure that this is exactly the same account? It could bethat you have different mnesia paths for iex and test environments, so you see two different databases. |
Yes, it was. I have now a path for each environment (dev, test, production) and I wipe all tables before the tests. I couldn't solve the original problem, but now I can live with it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Within a ExUnit test, I use an
on_exit
callback to cleanup the database after testing:After testing, I run
iex - S mix
and thenMy.Account |> My.Repo.all
, which still shows the same record. Is this result to be expected? Why doesn't the record get deleted? Am I missing anything?My best guess is that the delete does not get synced to disk. If this is the case, is there an idiomatic way to force the sync?
Thanks!
The text was updated successfully, but these errors were encountered: