Sandbox-like testing for read-only replica

This is exactly what I did with the Ecto config (both ReadRepo and WriteRepo have the same config), however, the transactions seems to block that route. An insert on WriteRepo is isolated from the get of ReadRepo. Not using the sandbox pool is working fine too, but has major downsides as stated above.

See: Problem: Failing tests with multiple Ecto repo's using same database (click the pencil with the edit date to see the original post)

ps. A dirty test was to alias WriteRepo as ReadRepo in my code. When I did that, the tests did run fine. However, I can’t do that in production :wink: