From a95648c25dd8b729f684106a549d06508a5bff8a Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Mon, 2 Mar 2026 10:51:59 +0000 Subject: [PATCH] Support running parallelized test suites --- config/test.exs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/test.exs b/config/test.exs index b3dc448b..c7ec57ff 100644 --- a/config/test.exs +++ b/config/test.exs @@ -6,13 +6,18 @@ import Config # to provide built-in test partitioning in CI environment. # Run `mix help test` for more information. config :music_library, MusicLibrary.Repo, - database: Path.expand("../data/music_library_test.db", __DIR__), + database: + Path.expand("../data/music_library_test#{System.get_env("MIX_TEST_PARTITION")}.db", __DIR__), # Double the amount of concurrent tests pool_size: 32, pool: Ecto.Adapters.SQL.Sandbox config :music_library, MusicLibrary.BackgroundRepo, - database: Path.expand("../data/music_library_background_test.db", __DIR__), + database: + Path.expand( + "../data/music_library_background_test#{System.get_env("MIX_TEST_PARTITION")}.db", + __DIR__ + ), pool_size: 32, pool: Ecto.Adapters.SQL.Sandbox