MultiNodeSpec Class |
Namespace: Akka.Remote.TestKit
The MultiNodeSpec type exposes the following members.
Name | Description | |
---|---|---|
MultiNodeSpec(MultiNodeConfig) | Initializes a new instance of the MultiNodeSpec class | |
MultiNodeSpec(RoleName, ActorSystem, ImmutableListRoleName, FuncRoleName, ImmutableListString) | Initializes a new instance of the MultiNodeSpec class |
Name | Description | |
---|---|---|
BaseConfig | ||
EventFilter |
Filter LogEvent sent to the system's EventStream.
In order to be able to filter the log the special logger
TestEventListener must be installed using the config
(Inherited from TestKitBase.)akka.loggers = ["Akka.TestKit.TestEventListener, Akka.TestKit"] | |
HasMessages |
Returns true if messages are available.
(Inherited from TestKitBase.) | |
InitialParticipants |
MUST BE DEFINED BY USER.
Defines the number of participants required for starting the test. This
might not be equals to the number of nodes available to the test.
| |
InitialParticipantsValueFactory |
Must be defined by user. Creates the values used by InitialParticipants | |
LastMessage |
The last message received by the TestActor.
(Inherited from TestKitBase.) | |
LastSender | (Inherited from TestKitBase.) | |
Log |
The built-in ILoggingAdapter used by Sys.
(Inherited from TestKitBase.) | |
MaxNodes |
Number of nodes node taking part in this test.
-Dmultinode.max-nodes=4
| |
Myself | ||
NodeConfig | ||
Remaining | Retrieves the time remaining for execution of the innermost enclosing Within block. Remarks The returned value is always finite. | |
RemainingOrDefault | Retrieves the time remaining for execution of the innermost enclosing Within block. If missing that, then it returns the properly dilated default for this case from settings (key: "akka.test.single-expect-default"). Remarks The returned value is always finite. | |
Roles |
All registered roles
| |
SelfIndex |
Index of this node in the roles sequence. The TestConductor
is started in "controller" mode on selfIndex 0, i.e. there you can inject
failures and shutdown other nodes etc.
| |
SelfName |
Name (or IP address; must be resolvable)
of the host this node is running on
-Dmultinode.host=host.example.com | |
SelfPort |
Port number of this node. Defaults to 0 which means a random port.
-Dmultinode.port=0 | |
ServerName |
Name (or IP address; must be resolvable using InetAddress.getByName)
of the host that the server node is running on.
-Dmultinode.server-host=server.example.com | |
ServerPort |
Port number of the node that's running the server system. Defaults to 4711.
-Dmultinode.server-port=4711 | |
ShutdownTimeout | ||
Sys |
The ActorSystem that is recreated and used for each test.
(Inherited from TestKitBase.) | |
TestActor |
The default TestActor. The actor can be controlled by sending it
special control messages, see TestActorSetIgnore,
TestActorWatch, TestActorUnwatch.
You can also install an AutoPilot to drive the actor, see
SetAutoPilot(AutoPilot). All other messages are forwarded to the queue
and can be retrieved with Receive and the ExpectMsg overloads.
(Inherited from TestKitBase.) | |
TestKitSettings |
The settings for the testkit.
(Inherited from TestKitBase.) | |
VerifySystemShutdown |
Override this and return `true` to assert that the
shutdown of the `ActorSystem` was done properly.
|
Name | Description | |
---|---|---|
ActorOf(Props) |
Create a new actor as child of Sys.
(Inherited from TestKitBase.) | |
ActorOf(ActionIActorDsl, String) |
Creates a new actor by defining the behavior inside the configure action.
(Inherited from TestKitBase.)Examples ActorOf(c => { c.Receive<string>((msg, ctx) => ctx.Sender.Tell("Hello " + msg)); }); | |
ActorOf(ActionIActorDsl, IActorContext, String) |
Creates a new actor by defining the behavior inside the configure action.
(Inherited from TestKitBase.)Examples ActorOf(c => { c.Receive<string>((msg, ctx) => ctx.Sender.Tell("Hello " + msg)); }); | |
ActorOf(Props, String) |
Create a new actor as child of Sys.
(Inherited from TestKitBase.) | |
ActorOfTActor |
Create a new actor as child of Sys.
(Inherited from TestKitBase.) | |
ActorOfTActor(ExpressionFuncTActor) |
Create a new actor as child of Sys using an expression that calls the constructor
of TActor.
(Inherited from TestKitBase.)Examples ActorOf<MyActor>(()=>new MyActor("value", 4711)) | |
ActorOfTActor(String) |
Create a new actor as child of Sys.
(Inherited from TestKitBase.) | |
ActorOfTActor(ExpressionFuncTActor, String) |
Create a new actor as child of Sys using an expression that calls the constructor
of TActor.
(Inherited from TestKitBase.)Examples ActorOf<MyActor>(()=>new MyActor("value", 4711), "test-actor") | |
ActorOfAsTestActorRefTActor(String) |
Create a new actor as child of Sys and returns it as TestActorRefTActor
to enable access to the underlying actor instance via UnderlyingActor.
(Inherited from TestKitBase.) | |
ActorOfAsTestActorRefTActor(ExpressionFuncTActor, String) |
Create a new actor as child of Sys and returns it as TestActorRefTActor
to enable access to the underlying actor instance via UnderlyingActor.
Uses an expression that calls the constructor of TActor.
(Inherited from TestKitBase.)Examples ActorOf<MyActor>(()=>new MyActor("value", 4711), "test-actor") | |
ActorOfAsTestActorRefTActor(IActorRef, String) |
Create a new actor as child of the specified supervisor and returns it as TestActorRefTActor
to enable access to the underlying actor instance via UnderlyingActor.
(Inherited from TestKitBase.) | |
ActorOfAsTestActorRefTActor(Props, String) |
Create a new actor as child of Sys and returns it as TestActorRefTActor
to enable access to the underlying actor instance via UnderlyingActor.
(Inherited from TestKitBase.) | |
ActorOfAsTestActorRefTActor(ExpressionFuncTActor, IActorRef, String) |
Create a new actor as child of the specified supervisor and returns it as TestActorRefTActor
to enable access to the underlying actor instance via UnderlyingActor.
Uses an expression that calls the constructor of TActor.
(Inherited from TestKitBase.)Examples ActorOf<MyActor>(()=>new MyActor("value", 4711), "test-actor") | |
ActorOfAsTestActorRefTActor(Props, IActorRef, String) |
Create a new actor as child of specified supervisor and returns it as TestActorRefTActor
to enable access to the underlying actor instance via UnderlyingActor.
(Inherited from TestKitBase.) | |
ActorOfAsTestFSMRefTFsmActor, TState, TData(String, Boolean) |
Create a new FSMTState, TData as child of Sys
and returns it as TestFSMRefTActor, TState, TData to enable inspecting and modifying the FSM directly.
TFsmActor must have a public parameterless constructor.
(Inherited from TestKitBase.) | |
ActorOfAsTestFSMRefTFsmActor, TState, TData(ExpressionFuncTFsmActor, String, Boolean) |
Create a new FSMTState, TData as child of Sys
and returns it as TestFSMRefTActor, TState, TData to enable inspecting and modifying the FSM directly.
Uses an expression that calls the constructor of TFsmActor.
(Inherited from TestKitBase.) | |
ActorOfAsTestFSMRefTFsmActor, TState, TData(IActorRef, String, Boolean) |
Create a new FSMTState, TData as child of the specified supervisor
and returns it as TestFSMRefTActor, TState, TData to enable inspecting and modifying the FSM directly.
TFsmActor must have a public parameterless constructor.
(Inherited from TestKitBase.) | |
ActorOfAsTestFSMRefTFsmActor, TState, TData(Props, String, Boolean) |
Create a new FSMTState, TData as child of Sys
and returns it as TestFSMRefTActor, TState, TData to enable inspecting and modifying the FSM directly.
(Inherited from TestKitBase.) | |
ActorOfAsTestFSMRefTFsmActor, TState, TData(ExpressionFuncTFsmActor, IActorRef, String, Boolean) |
Create a new FSMTState, TData as child of the specified supervisor
and returns it as TestFSMRefTActor, TState, TData to enable inspecting and modifying the FSM directly.
Uses an expression that calls the constructor of TFsmActor.
(Inherited from TestKitBase.) | |
ActorOfAsTestFSMRefTFsmActor, TState, TData(Props, IActorRef, String, Boolean) |
Create a new FSMTState, TData as child of the specified supervisor
and returns it as TestFSMRefTActor, TState, TData to enable inspecting and modifying the FSM directly.
(Inherited from TestKitBase.) | |
ActorSelection(String) |
Creates an ActorSelection(String) (Inherited from TestKitBase.) | |
ActorSelection(ActorPath) |
Creates an ActorSelection(ActorPath) (Inherited from TestKitBase.) | |
ActorSelection(IActorRef, String) |
Creates an ActorSelection(String) (Inherited from TestKitBase.) | |
AfterTermination |
Override this method to do something when the whole test is terminating.
| |
AtStartup |
Override this method to do something when the whole test is starting up.
| |
AttachConductor | ||
AwaitAssert | Await until the given assertion does not throw an exception or the timeout expires, whichever comes first. If the timeout expires the last exception is thrown. The action is called, and if it throws an exception the thread sleeps the specified interval before retrying. If no timeout is given, take it from the innermost enclosing `within` block. Note that the timeout is scaled using Dilated(TimeSpan), which uses the configuration entry "akka.test.timefactor". | |
AwaitCondition(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) | |
AwaitCondition(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) | |
AwaitCondition(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) | |
AwaitCondition(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. | |
AwaitConditionNoThrow | Await until the given condition evaluates to true or the timeout expires, whichever comes first. Returns true if the condition was fulfilled. The parameter interval specifies the time between calls to conditionIsFulfilled Between calls the thread sleeps. If interval is not specified or null 100 ms is used. | |
CreateEventFilter |
Creates a new event filter for the specified actor system.
(Inherited from TestKitBase.) | |
CreateTestActor |
Creates a test actor with the specified name. The actor can be controlled by sending it
special control messages, see TestActorSetIgnore,
TestActorWatch, TestActorUnwatch,
TestActorSetAutoPilot. All other messages are forwarded to the queue
and can be retrieved with Receive and the ExpectMsg overloads.
(Inherited from TestKitBase.)The default test actor can be retrieved from the TestActor property | |
CreateTestBarrier |
Wraps a Barrier for use in testing.
It always uses a timeout when waiting.
Timeouts will always throw an exception. The default timeout is 5 seconds.
(Inherited from TestKitBase.) | |
CreateTestLatch |
Creates a Countdown latch wrapper for use in testing.
It uses a timeout when waiting and timeouts are specified as durations.
There's a default timeout of 5 seconds and the default count is 1.
Timeouts will always throw an exception.
(Inherited from TestKitBase.) | |
CreateTestProbe(String) |
Creates a new TestProbe.
(Inherited from TestKitBase.) | |
CreateTestProbe(ActorSystem, String) |
Creates a new TestProbe.
(Inherited from TestKitBase.) | |
Dilated |
Multiplies the duration with the TestTimeFactor,
i.e. the config value "akka.test.timefactor"
(Inherited from TestKitBase.) | |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
Dispose(Boolean) | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
EnterBarrier |
Enter the named barriers in the order given. Use the remaining duration from
the innermost enclosing `within` block or the default `BarrierTimeout`
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExpectMsgT(NullableTimeSpan, String) |
Receive one message from the test actor and assert that it is of the specified type.
Wait time is bounded by the given duration, if specified; otherwise
wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectMsgT(ActionT, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor and calls the
action that performs extra assertions.
Use this variant to implement more complicated or conditional processing.
Wait time is bounded by the given duration, if specified; otherwise
wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectMsgT(PredicateT, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor and assert that the given
predicate accepts it.
Use this variant to implement more complicated or conditional processing.
Wait time is bounded by the given duration, if specified; otherwise
wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectMsgT(T, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor and assert that it
equals the message.
Wait time is bounded by the given duration, if specified; otherwise
wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectMsgT(ActionT, IActorRef, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor calls the
action that performs extra assertions.
Use this variant to implement more complicated or conditional processing.
Wait time is bounded by the given duration, if specified; otherwise
wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectMsgT(FuncT, IActorRef, Boolean, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor and assert that the given
predicate accepts it.
Use this variant to implement more complicated or conditional processing.
Wait time is bounded by the given duration, if specified; otherwise
wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectMsgT(T, FuncT, T, Boolean, NullableTimeSpan, String) |
Receive one message from the test actor and assert that it is equal to the expected value,
according to the specified comparer function.
Wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectMsgAllOfT(T) |
Receive a number of messages from the test actor matching the given
number of objects and assert that for each given object one is received
which equals it and vice versa. This construct is useful when the order in
which the objects are received is not fixed. Wait time is bounded by
RemainingOrDefault as duration, with an assertion exception being thrown in case of timeout.
(Inherited from TestKitBase.)dispatcher.Tell(SomeWork1())
dispatcher.Tell(SomeWork2())
ExpectMsgAllOf(TimeSpan.FromSeconds(1), Result1(), Result2()) | |
ExpectMsgAllOfT(TimeSpan, T) |
Receive a number of messages from the test actor matching the given
number of objects and assert that for each given object one is received
which equals it and vice versa. This construct is useful when the order in
which the objects are received is not fixed. Wait time is bounded by the
given duration, with an assertion exception being thrown in case of timeout.
(Inherited from TestKitBase.)dispatcher.Tell(SomeWork1())
dispatcher.Tell(SomeWork2())
ExpectMsgAllOf(TimeSpan.FromSeconds(1), Result1(), Result2()) | |
ExpectMsgAnyOfT |
Receive a message from the test actor and assert that it equals
one of the given messages. Wait time is bounded by
RemainingOrDefault as duration, with an assertion exception being thrown in case of timeout.
(Inherited from TestKitBase.) | |
ExpectMsgFromT(IActorRef, NullableTimeSpan, String) |
Receive one message from the test actor and assert that it is of the specified type
and was sent by the specified sender
Wait time is bounded by the given duration if specified.
If not specified, wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectMsgFromT(IActorRef, ActionT, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor, verifies that the sender is the specified
and calls the action that performs extra assertions.
Wait time is bounded by the given duration if specified.
If not specified, wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
Use this variant to implement more complicated or conditional processing.
(Inherited from TestKitBase.) | |
ExpectMsgFromT(IActorRef, PredicateT, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor and assert that the given
predicate accepts it and was sent by the specified sender
Wait time is bounded by the given duration if specified.
If not specified, wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
Use this variant to implement more complicated or conditional processing.
(Inherited from TestKitBase.) | |
ExpectMsgFromT(IActorRef, T, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor and assert that it
equals the message and was sent by the specified sender
Wait time is bounded by the given duration if specified.
If not specified, wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectMsgFromT(ActionIActorRef, ActionT, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor and calls the
action that performs extra assertions.
Wait time is bounded by the given duration if specified.
If not specified, wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
Use this variant to implement more complicated or conditional processing.
(Inherited from TestKitBase.) | |
ExpectMsgFromT(PredicateIActorRef, PredicateT, NullableTimeSpan, String) |
Receive one message of the specified type from the test actor and assert that the given
predicate accepts it and was sent by a sender that matches the isSender predicate.
Wait time is bounded by the given duration if specified.
If not specified, wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
Use this variant to implement more complicated or conditional processing.
(Inherited from TestKitBase.) | |
ExpectNoMsg |
Assert that no message is received.
Wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
ExpectNoMsg(Int32) |
Assert that no message is received for the specified time in milliseconds.
(Inherited from TestKitBase.) | |
ExpectNoMsg(TimeSpan) |
Assert that no message is received for the specified time.
(Inherited from TestKitBase.) | |
ExpectTerminated |
Receive one message from the test actor and assert that it is the Terminated message of the given ActorRef.
Wait time is bounded by the given duration, if specified; otherwise
wait time is bounded by remaining time for execution of the innermost enclosing 'within'
block, if inside a 'within' block; otherwise by the config value
"akka.test.single-expect-default".
(Inherited from TestKitBase.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FishForMessage(PredicateObject, NullableTimeSpan, String) |
Receives messages until isMessage returns true.
Use it to ignore certain messages while waiting for a specific message.
(Inherited from TestKitBase.) | |
FishForMessageT(PredicateT, NullableTimeSpan, String) |
Receives messages until isMessage returns true.
Use it to ignore certain messages while waiting for a specific message.
(Inherited from TestKitBase.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetTimeoutOrDefault |
If timeout is defined it is returned; otherwise
the config value "akka.test.single-expect-default" is returned.
(Inherited from TestKitBase.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IgnoreMessages |
Ignore all messages in the test actor for which the given function
returns true.
(Inherited from TestKitBase.) | |
IgnoreNoMessages | Stop ignoring messages in the test actor. (Inherited from TestKitBase.) | |
InitializeTest |
Initializes the TestState for a new spec.
(Inherited from TestKitBase.) | |
InjectDeployments | ||
IsNode |
Verify that the running node matches one of the given nodes
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MultiNodeSpecAfterAll | ||
MultiNodeSpecBeforeAll | ||
MuteDeadLetters | ||
Node |
Query the controller for the transport address of the given node (by role name) and
return that as an ActorPath for easy composition:
var serviceA = Sys.ActorSelection(Node(new RoleName("master")) / "user" / "serviceA"); | |
ReceiveN(Int32) |
Receive the specified number of messages using RemainingOrDefault as timeout.
(Inherited from TestKitBase.) | |
ReceiveN(Int32, TimeSpan) |
Receive the specified number of messages in a row before the given deadline.
The deadline is scaled by "akka.test.timefactor" using Dilated(TimeSpan).
(Inherited from TestKitBase.) | |
ReceiveOne(NullableTimeSpan) |
Receive one message from the internal queue of the TestActor.
This method blocks the specified duration or until a message
is received. If no message was received, null is returned.
(Inherited from TestKitBase.)Remarks This method does NOT automatically scale its Duration parameter using Dilated(TimeSpan)! | |
ReceiveOne(CancellationToken) |
Receive one message from the internal queue of the TestActor.
This method blocks until cancelled.
(Inherited from TestKitBase.) | |
ReceiveWhileT(NullableTimeSpan, FuncObject, T, Int32) |
Receive a series of messages until the function returns null or the overall
maximum duration is elapsed or expected messages count is reached.
Returns the sequence of messages.
Note that it is not an error to hit the `max` duration in this case.
The max duration is scaled by Dilated(TimeSpan) (Inherited from TestKitBase.) | |
ReceiveWhileT(FuncObject, T, NullableTimeSpan, NullableTimeSpan, Int32) |
Receive a series of messages until the function returns null or the idle
timeout is met (disabled by default) or the overall
maximum duration is elapsed or expected messages count is reached.
Returns the sequence of messages.
Note that it is not an error to hit the `max` duration in this case.
The max duration is scaled by Dilated(TimeSpan) (Inherited from TestKitBase.) | |
ReceiveWhileT(NullableTimeSpan, NullableTimeSpan, FuncObject, T, Int32) |
Receive a series of messages until the function returns null or the idle
timeout is met or the overall maximum duration is elapsed or
expected messages count is reached.
Returns the sequence of messages.
Note that it is not an error to hit the `max` duration in this case.
The max duration is scaled by Dilated(TimeSpan) (Inherited from TestKitBase.) | |
ReceiveWhileT(PredicateT, NullableTimeSpan, NullableTimeSpan, Int32, Boolean) |
Receive a series of messages.
It will continue to receive messages until the shouldIgnore predicate returns false or the idle
timeout is met (disabled by default) or the overall
maximum duration is elapsed or expected messages count is reached.
If a message that isn't of type T the parameter shouldIgnoreOtherMessageTypes
declares if the message should be ignored or not.
(Inherited from TestKitBase.)Returns the sequence of messages. Note that it is not an error to hit the `max` duration in this case. The max duration is scaled by Dilated(TimeSpan) | |
RemainingOr |
If inside a `within` block obtain time remaining for execution of the innermost enclosing `within`
block; otherwise returns the given duration.
(Inherited from TestKitBase.) | |
RemainingOrDilated |
If duration is finite it is returned after it has been scaled using Dilated(TimeSpan).
If duration is undefined, it returns the remaining time (if within a `within` block) or the properly dilated
default from settings (key "akka.test.single-expect-default").
If duration is infinite, an ArgumentException is thrown.
(Inherited from TestKitBase.)Remarks The returned value is always finite. | |
RunOn |
Execute the given block of code only on the given nodes (names according
to the `roleMap`).
| |
SetAutoPilot | Install an AutoPilot to drive the TestActor. The AutoPilot will be run for each received message and can be used to send or forward messages, etc. Each invocation must return the AutoPilot for the next round. To reuse the same AutoPilot return KeepRunning. | |
Shutdown(NullableTimeSpan, Boolean) |
Shuts down this system.
On failure debug output will be logged about the remaining actors in the system.
If verifySystemShutdown is true, then an exception will be thrown on failure.
(Inherited from TestKitBase.) | |
Shutdown(ActorSystem, NullableTimeSpan, Boolean) |
Shuts down the specified system.
On failure debug output will be logged about the remaining actors in the system.
If verifySystemShutdown is true, then an exception will be thrown on failure.
(Inherited from TestKitBase.) | |
StartNewSystem | ||
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TryReceiveOne(MessageEnvelope, NullableTimeSpan) |
Receive one message from the internal queue of the TestActor within
the specified duration. The method blocks the specified duration.
(Inherited from TestKitBase.)Remarks Note! that the returned envelope
is a MessageEnvelope containing the sender and the message. Remarks This method does NOT automatically scale its Duration parameter using Dilated(TimeSpan)! | |
TryReceiveOne(MessageEnvelope, NullableTimeSpan, CancellationToken) |
Receive one message from the internal queue of the TestActor within
the specified duration.
(Inherited from TestKitBase.)True is returned if a message existed, and the message is returned in envelope. The method blocks the specified duration, and can be cancelled using the cancellationToken. Remarks This method does NOT automatically scale its duration parameter using Dilated(TimeSpan)! | |
Unwatch |
Have the TestActor stop watching an actor.
(Inherited from TestKitBase.) | |
Watch |
Have the TestActor watch an actor and receive
Terminated messages when the actor terminates.
(Inherited from TestKitBase.) | |
Within(TimeSpan, Action, NullableTimeSpan) |
Execute code block while bounding its execution time between 0 seconds and max.
(Inherited from TestKitBase.)`within` blocks may be nested. All methods in this class which take maximum wait times are available in a version which implicitly uses the remaining time governed by the innermost enclosing `within` block. Remarks Note that the max duration is scaled using Dilated(TimeSpan) which uses the config value "akka.test.timefactor" | |
Within(TimeSpan, TimeSpan, Action, String, NullableTimeSpan) |
Execute code block while bounding its execution time between min and max.
(Inherited from TestKitBase.)`within` blocks may be nested. All methods in this class which take maximum wait times are available in a version which implicitly uses the remaining time governed by the innermost enclosing `within` block. Remarks Note that the max duration is scaled using Dilated(TimeSpan) which uses the config value "akka.test.timefactor" | |
WithinT(TimeSpan, FuncT, NullableTimeSpan) |
Execute code block while bounding its execution time between 0 seconds and max.
(Inherited from TestKitBase.)`within` blocks may be nested. All methods in this class which take maximum wait times are available in a version which implicitly uses the remaining time governed by the innermost enclosing `within` block. Remarks Note that the max duration is scaled using Dilated(TimeSpan) which uses the config value "akka.test.timefactor" | |
WithinT(TimeSpan, TimeSpan, FuncT, String, NullableTimeSpan) |
Execute code block while bounding its execution time between min and max.
(Inherited from TestKitBase.)`within` blocks may be nested. All methods in this class which take maximum wait times are available in a version which implicitly uses the remaining time governed by the innermost enclosing `within` block. Remarks Note that the max duration is scaled using Dilated(TimeSpan) which uses the config value "akka.test.timefactor" |
Name | Description | |
---|---|---|
TestConductor |
Name | Description | |
---|---|---|
AsInstanceOfT |
TBD
(Defined by Extensions.) | |
CreateManualPublisherProbeT |
Probe that implements IPublisher interface.
(Defined by TestPublisher.) | |
CreateManualSubscriberProbeT | (Defined by TestSubscriber.) | |
CreatePublisherProbeT | (Defined by TestPublisher.) | |
CreateSubscriberProbeT | (Defined by TestSubscriber.) | |
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.) | |
SinkProbeT |
A Sink that materialized to a TestSubscriberProbeT.
(Defined by TestSink.) | |
SourceProbeT |
A Source that materializes to a TestPublisherProbeT.
(Defined by TestSource.) |