I have an actor that works as some kind of driver for a game.
The actors writes changes to a database on timer trigger, then it creates new timer and so on.
Practically the actors sends messages to itself.
After an error ( a database is down for example ) it should recover itself so it can continue to drive the game as soon as possible.
I want to cover all important scenarios with tests.
What is the best way to test an actor with timers that mostly sends messages to itself?
I’m thinking to pass ActorRef to this actor to act as listener so I can get messages in test scenarios.
Is there any other approach?