arbiter-test-common-0.1.0.0
arbiter-test-common
Safe HaskellNone
LanguageGHC2024

Arbiter.Test.Poll

Description

Polling helpers for tests.

Synopsis

Documentation

Source #waitUntil :: HasCallStack => Int -> IO Bool -> IO ()

Poll every 100 ms until the predicate returns True. Fails with expectationFailure after timeoutMs milliseconds.

Source #withLinkedAsync :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b

Run withAsync with a linked handle. Raise a child-thread failure in the caller and stop the associated waitUntil.