1 2 3 4 5 6 7 8 9 10 11
use std::future::Future; use tokio::task::LocalSet; pub fn start_test(f: impl Future<Output = ()>) { tokio_test::block_on(async move { utils::init_logging(); tokio::time::pause(); LocalSet::new().run_until(f).await; }); }