Skip to content

Commit cebe2ed

Browse files
committed
Tests: each test's pool holds at most 4 connections (sc-9385)
The suite is one binary whose tests boot at once, each with its own pool of up to 10: a CI runner's threads asked Postgres for more than its 100 connections, and tests failed at boot with "pool timed out".
1 parent 902b660 commit cebe2ed

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎app/src/testing.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ pub fn configure() -> ApplicationBuilder {
4545
("SESSION_DRIVER", "database"),
4646
("WORKFLOW_STORE", "memory"),
4747
("DB_CONNECTION", "pgsql"),
48+
// Each test has its own application and pool, and the whole suite is one binary whose tests boot at once:
49+
// at the default 10 connections each, a CI runner's threads asked Postgres for more than its 100 and tests
50+
// failed at boot with "pool timed out" (sc-9385). A test needs a few at most.
51+
("DB_MAX_CONNECTIONS", "4"),
4852
("VISUALCI_S3_BUCKET", "visualci-test"),
4953
("VISUALCI_S3_ACCESS_KEY_ID", "visualci"),
5054
("VISUALCI_S3_SECRET_ACCESS_KEY", "visualci-dev-secret"),

0 commit comments

Comments
 (0)