From c18f9cd2e3718ca7fa7f904149726abe23e96377 Mon Sep 17 00:00:00 2001 From: Willem van den Ende Date: Fri, 20 Mar 2026 21:01:32 +0000 Subject: [PATCH] Fix Sandbox module not available in DataCase setup The alias was inside the `using` block (only available to consumers), but setup_sandbox/1 runs in DataCase itself. Use fully qualified name. --- app/test/support/data_case.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/support/data_case.ex b/app/test/support/data_case.ex index 065c109..57b0cee 100644 --- a/app/test/support/data_case.ex +++ b/app/test/support/data_case.ex @@ -38,8 +38,8 @@ defmodule Firehose.DataCase do Sets up the sandbox based on the test tags. """ def setup_sandbox(tags) do - pid = Sandbox.start_owner!(Firehose.Repo, shared: not tags[:async]) - on_exit(fn -> Sandbox.stop_owner(pid) end) + pid = Ecto.Adapters.SQL.Sandbox.start_owner!(Firehose.Repo, shared: not tags[:async]) + on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end) end @doc """