If I have 2 apps in a umbrella project. They each have their own config/test.exs
. If I run mix test
in app1 everything works fine, however if I then run mix test
in app2, it’s still using the configuration from app1. Anyway to force this to update?
The more detailed answer is that one of the umbrella apps is more of a shared library. We use the configs to do some injection, and the test.exs for the shared library has something like:
config :project, :queue,
consumer: Project.Common.Fakes.Queue
In the other apps, that consumer references a different implementation (it references the real implementation, in those cases, since we’re not interested in re-unit testing the queue consumer, we’re interested in testing the queue consumption from that apps point of view). So, something like:
config :project, :queue,
consumer: Project.App1.Consumer
But, switching from app to app doesn’t run the “correct” app’s consumer. It uses whatever the last one was when it had to recompile.