File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use deadpool_diesel::postgres::Pool;
3
3
use deadpool_diesel:: Timeouts ;
4
4
use http:: StatusCode ;
5
5
use std:: time:: Duration ;
6
+ use tracing:: info;
6
7
7
8
const DB_HEALTHY_TIMEOUT : Duration = Duration :: from_millis ( 2000 ) ;
8
9
@@ -11,10 +12,13 @@ fn default_timeouts() -> Timeouts {
11
12
}
12
13
13
14
fn wait_until_healthy ( pool : & Pool , app : & TestApp ) {
14
- let _ = app
15
+ info ! ( "Waiting for the database to become healthy…" ) ;
16
+ let result = app
15
17
. 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" ) ;
18
22
}
19
23
20
24
#[ test]
You can’t perform that action at this time.
0 commit comments