chore(test): the DB lane runs on every core — each pytest-xdist worker gets its own database
This commit is contained in:
@@ -552,7 +552,10 @@ describe("the gate register (docs/gates.md)", () => {
|
||||
"[pytest]",
|
||||
"testpaths = tests",
|
||||
"pythonpath = .",
|
||||
"addopts = -q -rs --strict-markers",
|
||||
// `-p tests.db_per_worker` selects nothing and filters nothing: under `-n` it hands each worker its
|
||||
// own database (DATABASE_URL + `_gw<N>`), so the same tests can run side by side
|
||||
"addopts = -q -rs --strict-markers -p tests.db_per_worker",
|
||||
"db_per_worker_env = DATABASE_URL",
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -1232,6 +1232,7 @@
|
||||
" POSTGRES_DB: siftlode_test",
|
||||
" tmpfs:",
|
||||
" - /var/lib/postgresql/data # ephemeral + fast; the schema is rebuilt per run",
|
||||
" command: [\"postgres\", \"-c\", \"max_connections=300\"]",
|
||||
" healthcheck:",
|
||||
" test: [\"CMD-SHELL\", \"pg_isready -U siftlode -d siftlode_test\"]",
|
||||
" interval: 1s",
|
||||
@@ -1250,7 +1251,7 @@
|
||||
" volumes:",
|
||||
" - ./:/app",
|
||||
" working_dir: /app",
|
||||
" command: [\"python\", \"-m\", \"pytest\"]"
|
||||
" command: [\"python\", \"-m\", \"pytest\", \"-n\", \"auto\"]"
|
||||
],
|
||||
"frontend/.prettierignore": [
|
||||
"dist",
|
||||
|
||||
Reference in New Issue
Block a user