Yep, just added async: false to all test files. Also, because of all processes register themselves within the local registry, I added it to the restart routine as well:
setup do
accounts = TestAccounts.accounts()
{:ok, registry} = Registry.start_link(:unique, Postman.Registry)
{:ok, scheduler} = Enum.map(accounts, &Map.get(&1, :name)) |> Scheduler.start_link()
{:ok, accs_sup} = AccountsSupervisor.start_link()
{:ok, provisor} = Provisor.start_link()
on_exit fn ->
TestUtils.kill_if_alive(accs_sup)
TestUtils.kill_if_alive(provisor)
TestUtils.kill_if_alive(scheduler)
TestUtils.kill_if_alive(registry)
end
{:ok, accounts: accounts}
end
and bam - Registry.start_link(:unique, Postman.Registry) throw all kinds of amazing errors:
** (MatchError) no match of right hand side value: {:error, {:already_started, #PID<0.608.0>}}
14:01:37.012 [error] GenServer Postman.Registry.PIDPartition0 terminating ** (stop) killed Last message: {:EXIT, #PID<0.566.0>, :killed}
(two different runs)


















