-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Copy link
Labels
Milestone
Description
Is your feature request related to a problem? Please describe.
Based on a discussion in our #premium-support Discord - it would be really helpful if there was some built-in way of triggering an actor to throw an exception and restart so we could test actor recovery inside TestKit tests.
Describe the solution you'd like
Something akin to the Kill message without shutting down the actor:
akka.net/src/core/Akka/Actor/IAutoReceivedMessage.cs
Lines 223 to 237 in 1f7ffa7
| public sealed class Kill : IAutoReceivedMessage | |
| { | |
| private Kill() { } | |
| /// <summary> | |
| /// The singleton instance of Kill. | |
| /// </summary> | |
| public static Kill Instance { get; } = new(); | |
| public override string ToString() | |
| { | |
| return "<Kill>"; | |
| } | |
| } |
Describe alternatives you've considered
We could try to implement something inside the TestKit using the TestActorOf<TActor> method but I think this is a lot simpler by comparison.