pub fn run_while<BackgroundFut, ResultFut, Out>(
    exec: &mut TestExecutor,
    background_fut: BackgroundFut,
    result_fut: ResultFut
) -> (Out, BackgroundFut)
where BackgroundFut: Future + Unpin, ResultFut: Future<Output = Out>,
Expand description

! Utilities for tests Run a background task while waiting for a future that should occur. This is useful for running a task which you expect to produce side effects that mean the task is operating correctly. i.e. reacting to a peer action by producing a response on a client’s hanging get. background_fut is expected not to finish ans is returned to the caller, along with the result of result_fut. If background_fut finishes, this function will panic.