Skip to content

TestingUtils.WaitUntilAsync(Func<bool, Task<bool>>, TimeSpan, TimeSpan?)

WaitUntilAsync(Func<bool, Task<bool>>, TimeSpan, TimeSpan?)

static
View source
public static Task WaitUntilAsync(Func<bool, Task<bool>> predicate, TimeSpan timeout, TimeSpan? delayOnFail = null)
Run the predicate until it succeed or times out

Parameters

predicateFunc<bool, Task<bool>>
The predicate to run
timeoutTimeSpan
The timeout value
delayOnFailTimeSpan?
The time to delay next call upon failure

Returns

True if the predicate succeed, false otherwise