Safely Share Connections with Allowances
Explore how to use Ecto allowances to safely share database connections between test processes, preventing isolated failures in concurrent tests. Understand the best practices for calling allow and managing test state isolation.
We'll cover the following...
We'll cover the following...
Allowances
Ecto provides a mechanism called allowances to work around the limitations of shared mode. This allows us to pick and choose which processes we share our database connection with. We can keep a single database connection for all processes needed for our test and ensure that the database state is isolated from any other tests running concurrently.
Let’s go back to the test we looked at in the last ...