Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions native/kde-snap-shot/src/feedback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,23 @@ mod tests {
let f = crate::transport_tests::Fixture::new();
let (send, commands) = async_channel::bounded(4);
let (done, finished) = mpsc::sync_channel(1);
f.client
.object_server()
.at(
// Build with the bridge registered so zbus waits for its method-call listener.
// Registering it after build can drop the first call while that listener starts.
let bridge = Builder::address(f.address.as_str())
.unwrap()
.method_timeout(DEADLINE)
.serve_at(
OBJECT,
Bridge {
owner: f._server.unique_name().unwrap().to_string(),
commands,
done,
},
)
.unwrap()
.build()
.unwrap();
let destination = f.client.unique_name().unwrap().to_string();
let destination = bridge.unique_name().unwrap().to_string();
let stranger = Builder::address(f.address.as_str())
.unwrap()
.method_timeout(DEADLINE)
Expand Down Expand Up @@ -275,10 +280,7 @@ mod tests {
kwin.call::<_, _, ()>("Event", &("{\"event\":\"done\"}",))
.unwrap();
finished.recv_timeout(DEADLINE).unwrap();
f.client
.object_server()
.remove::<Bridge, _>(OBJECT)
.unwrap();
bridge.object_server().remove::<Bridge, _>(OBJECT).unwrap();
}

#[test]
Expand Down
Loading