mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-05 14:10:34 -04:00
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:
parent
a6f3b37897
commit
af3cb08778
2 changed files with 8 additions and 0 deletions
|
@ -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,
|
||||
|
|
|
@ -365,7 +365,9 @@ mod test {
|
|||
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::iter::zip;
|
||||
use std::time::Duration;
|
||||
use tokio::fs::read;
|
||||
use tokio::time::sleep;
|
||||
use zbus::{Connection, ConnectionBuilder, Interface};
|
||||
use zbus_xml::{Method, Node, Property};
|
||||
|
||||
|
@ -384,6 +386,8 @@ mod test {
|
|||
.at("/com/steampowered/SteamOSManager1", manager)
|
||||
.await?;
|
||||
|
||||
sleep(Duration::from_millis(1)).await;
|
||||
|
||||
Ok(TestHandle {
|
||||
_handle: handle,
|
||||
connection,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue