Skip to content

Commit 49dfc21

Browse files
committed
Wait for db to finish updating before handing off to tests.
1 parent 2a92722 commit 49dfc21

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/helpers/daemon.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,15 @@ impl Daemon {
9595
};
9696

9797
// Wait until we can connect to the daemon
98-
while let Err(_) = daemon.maybe_connect() {
98+
let mut client;
99+
loop {
100+
if let Ok(c) = daemon.maybe_connect() {
101+
client = c;
102+
break;
103+
}
104+
sleep()
105+
}
106+
while let Some(_) = client.status().expect("Couldn't get status.").updating_db {
99107
sleep()
100108
}
101109

0 commit comments

Comments
 (0)