Click or drag to resize
Akka.NETTestKitBaseAwaitCondition Method
Overload List
  NameDescription
Public methodAwaitCondition(FuncBoolean)

Await until the given condition evaluates to true or until a timeout

The timeout is taken from the innermost enclosing `within` block (if inside a `within` block) or the value specified in config value "akka.test.single-expect-default". The value is dilated, i.e. scaled by the factor specified in config value "akka.test.timefactor"..

A call to conditionIsFulfilled is done immediately, then the threads sleep for about a tenth of the timeout value, before it checks the condition again. This is repeated until timeout or the condition evaluates to true. To specify another interval, use the overload AwaitCondition(FuncBoolean, NullableTimeSpan, NullableTimeSpan, String)

Public methodAwaitCondition(FuncBoolean, NullableTimeSpan)

Await until the given condition evaluates to true or the timeout expires, whichever comes first.

If no timeout is given, take it from the innermost enclosing `within` block (if inside a `within` block) or the value specified in config value "akka.test.single-expect-default". The value is dilated, i.e. scaled by the factor specified in config value "akka.test.timefactor"..

A call to conditionIsFulfilled is done immediately, then the threads sleep for about a tenth of the timeout value, before it checks the condition again. This is repeated until timeout or the condition evaluates to true. To specify another interval, use the overload AwaitCondition(FuncBoolean, NullableTimeSpan, NullableTimeSpan, String)

Public methodAwaitCondition(FuncBoolean, NullableTimeSpan, String)

Await until the given condition evaluates to true or the timeout expires, whichever comes first.

If no timeout is given, take it from the innermost enclosing `within` block (if inside a `within` block) or the value specified in config value "akka.test.single-expect-default". The value is dilated, i.e. scaled by the factor specified in config value "akka.test.timefactor"..

A call to conditionIsFulfilled is done immediately, then the threads sleep for about a tenth of the timeout value, before it checks the condition again. This is repeated until timeout or the condition evaluates to true. To specify another interval, use the overload AwaitCondition(FuncBoolean, NullableTimeSpan, NullableTimeSpan, String)

Public methodAwaitCondition(FuncBoolean, NullableTimeSpan, NullableTimeSpan, String)

Await until the given condition evaluates to true or the timeout expires, whichever comes first.

If no timeout is given, take it from the innermost enclosing `within` block.

Note that the timeout is dilated, i.e. scaled by the factor specified in config value "akka.test.timefactor".

The parameter interval specifies the time between calls to conditionIsFulfilled Between calls the thread sleeps. If interval is undefined the thread only sleeps one time, using the max as duration, and then rechecks the condition and ultimately succeeds or fails.

To make sure that tests run as fast as possible, make sure you do not leave this value as undefined, instead set it to a relatively small value.

Top
See Also