Make db-dependent tests sync
As explained at https://hexdocs.pm/ecto_sqlite3/Ecto.Adapters.SQLite3.html#module-async-sandbox-testing: The Ecto SQLite3 adapter does not support async tests when used with Ecto.Adapters.SQL.Sandbox. This is due to SQLite only allowing up one write transaction at a time, which often does not work with the Sandbox approach of wrapping each test in a transaction.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
defmodule MusicLibraryWeb.CoverControllerTest do
|
defmodule MusicLibraryWeb.CoverControllerTest do
|
||||||
use MusicLibraryWeb.ConnCase, async: true
|
use MusicLibraryWeb.ConnCase
|
||||||
|
|
||||||
import MusicLibrary.RecordsFixtures
|
import MusicLibrary.RecordsFixtures
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
defmodule MusicLibraryWeb.StatsControllerTest do
|
defmodule MusicLibraryWeb.StatsControllerTest do
|
||||||
use MusicLibraryWeb.ConnCase, async: true
|
use MusicLibraryWeb.ConnCase
|
||||||
|
|
||||||
alias MusicLibrary.Records.Record
|
alias MusicLibrary.Records.Record
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
defmodule MusicLibraryWeb.RecordIndexTest do
|
defmodule MusicLibraryWeb.RecordIndexTest do
|
||||||
use MusicLibraryWeb.ConnCase, async: true
|
use MusicLibraryWeb.ConnCase
|
||||||
|
|
||||||
import Phoenix.LiveViewTest
|
import Phoenix.LiveViewTest
|
||||||
import MusicLibrary.RecordsFixtures
|
import MusicLibrary.RecordsFixtures
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
defmodule MusicLibraryWeb.RecordShowTest do
|
defmodule MusicLibraryWeb.RecordShowTest do
|
||||||
use MusicLibraryWeb.ConnCase, async: true
|
use MusicLibraryWeb.ConnCase
|
||||||
|
|
||||||
import Phoenix.LiveViewTest
|
import Phoenix.LiveViewTest
|
||||||
import MusicLibrary.RecordsFixtures
|
import MusicLibrary.RecordsFixtures
|
||||||
|
|||||||
Reference in New Issue
Block a user