chore(test): the DB lane runs on every core — each pytest-xdist worker gets its own database
This commit is contained in:
@@ -16,6 +16,9 @@ services:
|
||||
POSTGRES_DB: siftlode_test
|
||||
tmpfs:
|
||||
- /var/lib/postgresql/data # ephemeral + fast; the schema is rebuilt per run
|
||||
# One database per pytest-xdist worker, each through the app's own pool (5 + 10 overflow): the default 100
|
||||
# connections would run out at 8 workers.
|
||||
command: ["postgres", "-c", "max_connections=300"]
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U siftlode -d siftlode_test"]
|
||||
interval: 1s
|
||||
@@ -37,4 +40,4 @@ services:
|
||||
- ./:/app
|
||||
working_dir: /app
|
||||
# Coverage is on demand, not in the gate: see docs/development.md.
|
||||
command: ["python", "-m", "pytest"]
|
||||
command: ["python", "-m", "pytest", "-n", "auto"]
|
||||
|
||||
Reference in New Issue
Block a user