Search code examples
rubymicroservicesacceptance-testing

Is it ok to reset database on running programs in acceptance testing?


I have a system of multiple ruby applications. Full stop and start of this system takes about 2 minutes. I decided to make my apps fault-tolerant to DB downs, so when I drop databases and restore them my apps don't fail.

Is it normal? Are there any pitfalls?


Solution

  • If your schema changes, you still need to restart the Rails processes. The reason is that ActiveRecord caches column data during startup.