1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
use ntest::timeout;
use test_log::test;
use zbus::{block_on, conn::Builder, Result};
#[test]
#[ignore]
#[timeout(15000)]
fn unixexec_connection_async() {
block_on(test_unixexec_connection()).unwrap();
}
async fn test_unixexec_connection() -> Result<()> {
let connection = Builder::address("unixexec:path=systemd-stdio-bridge")?
.build()
.await?;
match connection
.call_method(
Some("org.freedesktop.DBus"),
"/org/freedesktop/DBus",
Some("org.freedesktop.DBus"),
"Hello",
&(),
)
.await
{
Err(zbus::Error::MethodError(_, _, _)) => (),
Err(e) => panic!("{}", e),
_ => panic!(),
};
Ok(())
}
|