Module testactor

Module testactor 

Source
Expand description

This module defines a test actor. It is defined in a separate module (outside of [crate::v1::testing]) to ensure that it is compiled into the bootstrap binary, which is not built in test mode (and anyway, test mode does not work across crate boundaries)

Structs§

CauseSupervisionEvent
A message that causes a supervision event. The one argument determines what kind of supervision event it’ll be.
FailingCreateTestActor
Forward
A message to forward to a visit list of ports. Each port removes the next entry, and adds it to the ‘visited’ list.
GetActorId
A message that returns the recipient actor’s id.
GetCastInfo
Just return the cast info of the sender.
GetConfigAttrs
NextSupervisionFailure
A message to request the next supervision event delivered to WrapperActor. Replies with None if no supervision event is encountered within a timeout (10 seconds).
SetConfigAttrs
SleepActor
A test actor that sleeps when it receives a Duration message. Used for testing timeout and abort behavior.
TestActor
A simple test actor used by various unit tests.
TestActorWithSupervisionHandling
A test actor that handles supervision events. It should be the parent of TestActor who can panic or cause a SIGSEGV.
WrapperActor
A small wrapper to handle supervision messages so they don’t need to reach the client. This just wraps and forwards all messages to TestActor. The supervision events are sent back to “supervisor”.

Enums§

SupervisionEventType

Traits§

GetCastInfoClient
The custom client trait for this message type.
GetCastInfoHandler
The custom handler trait for this message type.