Skip to content

Commit 59516fc

Browse files
committed
tests/unhealthy_database: Add debug logging
1 parent ce3f440 commit 59516fc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/tests/unhealthy_database.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use deadpool_diesel::postgres::Pool;
33
use deadpool_diesel::Timeouts;
44
use http::StatusCode;
55
use std::time::Duration;
6+
use tracing::info;
67

78
const DB_HEALTHY_TIMEOUT: Duration = Duration::from_millis(2000);
89

@@ -11,10 +12,13 @@ fn default_timeouts() -> Timeouts {
1112
}
1213

1314
fn wait_until_healthy(pool: &Pool, app: &TestApp) {
14-
let _ = app
15+
info!("Waiting for the database to become healthy…");
16+
let result = app
1517
.runtime()
16-
.block_on(pool.timeout_get(&default_timeouts()))
17-
.expect("the database did not return healthy");
18+
.block_on(pool.timeout_get(&default_timeouts()));
19+
20+
info!("pool.timeout_get() returned");
21+
let _ = result.expect("the database did not return healthy");
1822
}
1923

2024
#[test]

0 commit comments

Comments
 (0)