Skip to main content

eventually

Function eventually 

Source
pub fn eventually(
    timeout: Duration,
    condition: impl AsyncFnMut() -> bool,
) -> impl Future<Output = ()>
Expand description

Poll condition until it returns true, panicking after timeout

Only use this for state the test cannot synchronize with directly, like the server noticing that a TCP connection was closed.

ยงPanics

Panics if condition is still false after timeout.