add SQLite concurrency tests and bench task
BenchRepo for isolated concurrency testing against temp DB files. Correctness tests prove WAL concurrent reads, IMMEDIATE transaction mode vs DEFERRED upgrade failures, and PRAGMA application. Benchmark tests (tagged :benchmark, excluded by default) measure throughput. mix bench.sqlite runs HTTP load scenarios against the full Phoenix stack with --prod, --scale, --pool-size, and --busy-timeout options. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
12
test/support/bench_repo.ex
Normal file
12
test/support/bench_repo.ex
Normal file
@@ -0,0 +1,12 @@
|
||||
defmodule Berrypod.BenchRepo do
|
||||
@moduledoc """
|
||||
Standalone Ecto Repo for SQLite concurrency tests.
|
||||
|
||||
Started dynamically against temp DB files — no Sandbox, no Application
|
||||
config dependency. Each test controls pool size, PRAGMAs, and transaction
|
||||
mode independently.
|
||||
"""
|
||||
use Ecto.Repo,
|
||||
otp_app: :berrypod,
|
||||
adapter: Ecto.Adapters.SQLite3
|
||||
end
|
||||
Reference in New Issue
Block a user