summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rust/uci/mod.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rust/uci/mod.rs b/src/rust/uci/mod.rs
index 3458fc5..b9a8b23 100644
--- a/src/rust/uci/mod.rs
+++ b/src/rust/uci/mod.rs
@@ -655,7 +655,7 @@ mod tests {
#[test]
fn test_hal_error_event() {
- let (dispatcher, hal_sender) =
+ let (mut dispatcher, hal_sender) =
setup_dispatcher_and_return_hal_cb_sender(|mock_adaptation, mock_event_manager| {
mock_adaptation.expect_hal_open(Ok(()));
mock_adaptation.expect_core_initialization(Ok(()));
@@ -667,9 +667,16 @@ mod tests {
hal_sender
.send((
HalCallback::Event { event: UwbEvent::ERROR, event_status: UwbStatus::FAILED },
+ chip_id.clone(),
+ ))
+ .unwrap();
+ hal_sender
+ .send((
+ HalCallback::Event { event: UwbEvent::CLOSE_CPLT, event_status: UwbStatus::OK },
chip_id,
))
.unwrap();
+ dispatcher.wait_for_exit().unwrap();
}
#[test]