TestLatch Class |
A count down latch that initially is closed. In order for it to become open CountDown must be called. By default one call is enough, but this can be changed by specifying the count in the constructor.
By default a timeout of 5 seconds is used.
When created using TestKit.CreateTestLatch the default timeout from DefaultTimeout is used and all timeouts are dilated, i.e. multiplied by TestTimeFactor
Timeouts will always throw an exception.Namespace: Akka.TestKit
The TestLatch type exposes the following members.
Name | Description | |
---|---|---|
TestLatch |
Initializes a new instance of the TestLatch class with count = 1, i.e. the
instance will become open after one call to CountDown.
The default timeout is set to 5 seconds.
| |
TestLatch(Int32) |
Initializes a new instance of the TestLatch class with the specified count, i.e
number of times CountDown must be called to make this instance become open.
The default timeout is set to 5 seconds.
| |
TestLatch(Int32, TimeSpan) |
Initializes a new instance of the TestLatch class with the specified count, i.e
number of times CountDown must be called to make this instance become open.
| |
TestLatch(FuncTimeSpan, TimeSpan, TimeSpan, Int32) |
TBD
|
Name | Description | |
---|---|---|
CountDown |
Count down the latch.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Open |
Make this instance become open.
| |
Ready |
Expects the latch to become open within the default timeout. If the timeout is reached, a
TimeoutException is thrown.
If no timeout was specified when creating this instance, 5 seconds is used. If this instance has been created using TestKit.CreateTestLatch the default timeout from DefaultTimeout is used and dilated, i.e. multiplied by TestTimeFactor | |
Ready(TimeSpan) |
Expects the latch to become open within the specified timeout. If the timeout is reached, a
TimeoutException is thrown.
If this instance has been created using TestKit.CreateTestLatchtimeout is dilated, i.e. multiplied by TestTimeFactor | |
Reset |
Reset this instance to the initial count, making it become closed.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
DefaultTimeout | Obsolete.
Obsolete. This field will be removed. DefaultTimeout is an alternative.
|
Name | Description | |
---|---|---|
AsInstanceOfT |
TBD
(Defined by Extensions.) | |
Match | Overloaded.
Matches the specified target.
(Defined by PatternMatch.) | |
MatchT | Overloaded.
Matches the specified target and return a result of target processing.
(Defined by PatternMatch.) |