manager: Fix tests hanging (fixes #2)

I'm not 100% sure why this works, but I expect it has to do with messages being sent to D-Bus before the initial handshake is done.
This commit is contained in:
Vicki Pfau 2024-07-15 18:38:13 -07:00
parent a6f3b37897
commit af3cb08778
2 changed files with 8 additions and 0 deletions

View file

@ -323,7 +323,9 @@ mod test {
use crate::power::{self, get_gpu_performance_level};
use crate::process::test::{code, exit, ok};
use crate::testing;
use std::time::Duration;
use tokio::fs::{create_dir_all, write};
use tokio::time::sleep;
use zbus::{Connection, ConnectionBuilder};
struct TestHandle {
@ -351,6 +353,8 @@ mod test {
.at("/com/steampowered/SteamOSManager1", manager)
.await?;
sleep(Duration::from_millis(1)).await;
Ok(TestHandle {
h: handle,
connection,