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.
This commit is contained in:
Claudio Ortolina
2024-11-30 22:41:56 +00:00
parent c65a29c252
commit 7a26b6bda6
+1 -2
View File
@@ -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,