Click or drag to resize
Akka.NETTestKitBaseInternalAwaitCondition Method (FuncBoolean, TimeSpan, NullableTimeSpan, ActionString, Object, ILoggingAdapter)

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.

Namespace:  Akka.TestKit
Assembly:  Akka.TestKit (in Akka.TestKit.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
protected static bool InternalAwaitCondition(
	Func<bool> conditionIsFulfilled,
	TimeSpan max,
	Nullable<TimeSpan> interval,
	Action<string, Object[]> fail,
	ILoggingAdapter logger
)

Parameters

conditionIsFulfilled
Type: SystemFuncBoolean
The condition that must be fulfilled within the duration.
max
Type: SystemTimeSpan
The maximum duration. The value is dilated, i.e. scaled by the factor specified in config value "akka.test.timefactor".
interval
Type: SystemNullableTimeSpan
The time between calls to conditionIsFulfilled to check if the condition is fulfilled. Between calls the thread sleeps. If undefined the thread only sleeps one time, using the max, 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 set this value as undefined, instead set it to a relatively small value.

fail
Type: SystemActionString, Object
Action that is called when the timeout expired. The parameters conforms to Format(String, Object)
logger
Type: Akka.EventILoggingAdapter
If a ILoggingAdapter is specified, debug messages will be logged using it. If null nothing will be logged

Return Value

Type: Boolean
TBD
See Also