Respect must_use call result in testkit
@@ -227,11 +227,12 @@ pub fn spawn_state_keeper(
let (stop_state_keeper_sender, stop_state_keeper_receiver) = oneshot::channel::<()>();
let sk_thread_handle = std::thread::spawn(move || {
let mut main_runtime = Runtime::new().expect("main runtime start");
- start_state_keeper(state_keeper, &main_runtime);
+ let state_keeper_task = start_state_keeper(state_keeper, &main_runtime);
main_runtime.block_on(async move {
- stop_state_keeper_receiver
- .await
- .expect("stop sk sender dropped");
+ tokio::select! {
+ _ = stop_state_keeper_receiver => {},
+ _ = state_keeper_task => {},
+ }
})
});
