Testkit
// exactly matches the given protobuf message.
// It fails the test if no message is received or the message does not match.
ExpectMessage(message proto.Message)
// ExpectMessageWithin asserts that the expected message is received within the given duration.
// It fails the test if the timeout is reached or the message differs.
ExpectMessageWithin(duration time.Duration, message proto.Message)
// ExpectNoMessage asserts that no message is received within a short, default time window.
// This is useful for asserting inactivity or idle actors.
ExpectNoMessage()
// ExpectAnyMessage waits for and returns the next message received by the probe.
// It fails the test if no message is received in a reasonable default timeout.
ExpectAnyMessage() proto.Message
// ExpectAnyMessageWithin waits for and returns the next message received within the specified duration.
// It fails the test if no message is received in the given time window.
ExpectAnyMessageWithin(duration time.Duration) proto.Message
// ExpectMessageOfType asserts that the next received message matches the given message type.
// It fails the test if no message is received or the type does not match.
ExpectMessageOfType(messageType protoreflect.MessageType)
// ExpectMessageOfTypeWithin asserts that a message of the given type is received within the specified duration.
// It fails the test if the type does not match or if the timeout is reached.
ExpectMessageOfTypeWithin(duration time.Duration, messageType protoreflect.MessageType)
// ExpectTerminated asserts that the actor with the specified name has terminated.
// This is useful when verifying actor shutdown behavior.
ExpectTerminated(actorName string)Note
Last updated