Skip to content

Commit b132fe7

Browse files
committed
WIP: Increase connection pool size for integration tests
1 parent 4d9967e commit b132fe7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

store/postgres/src/pool/mod.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ impl PoolState {
180180
// We just tried to set up the pool; if it is still not set up and
181181
// we didn't have an error, it means the database is not available
182182
if self.needs_setup() {
183+
error!(self.logger, "Database is not available, setup did not work");
183184
return Err(StoreError::DatabaseUnavailable);
184185
} else {
185186
Ok(pool)
@@ -511,10 +512,13 @@ impl PoolInner {
511512
}
512513

513514
async fn get(&self) -> Result<AsyncPgConnection, StoreError> {
514-
self.pool
515-
.get()
516-
.await
517-
.map_err(|_| StoreError::DatabaseUnavailable)
515+
self.pool.get().await.map_err(|e| {
516+
error!(
517+
self.logger,
518+
"Error getting Postgres connection from pool: {e}"
519+
);
520+
StoreError::DatabaseUnavailable
521+
})
518522
}
519523

520524
/// Get the pool for fdw connections. It is an error if none is configured

tests/src/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ impl Config {
199199
&ports.admin.to_string(),
200200
"--metrics-port",
201201
&ports.metrics.to_string(),
202+
"--store-connection-pool-size",
203+
"40",
202204
];
203205

204206
let args = args

0 commit comments

Comments
 (0)