From 7a26b6bda619e3cb646c12caf40bfa782259ba78 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sat, 30 Nov 2024 22:41:56 +0000 Subject: [PATCH] Reduce pool size in test Due to SQLite having one single write transaction, database tests cannot be executed async, making a large pool ineffective at best. A setting of 10 is enough for those tests where we perform multiple read operations (which tend to be sequential anyway). Test execution time before and after this change remains effectively the same. --- config/test.exs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/test.exs b/config/test.exs index dbe8902d..c12a5743 100644 --- a/config/test.exs +++ b/config/test.exs @@ -7,8 +7,7 @@ import Config # Run `mix help test` for more information. config :music_library, MusicLibrary.Repo, database: Path.expand("../data/music_library_test.db", __DIR__), - # Double the amount of concurrent tests - pool_size: 32, + pool_size: 10, pool: Ecto.Adapters.SQL.Sandbox # We don't run a server during test. If one is required,