I am working with a persistent actor in Scala using EventStore as a backend. Testing is specs2-based. During initialization of the spec class, inside the constructor of the other class that is being instantiated, I ask my actor for something and, if EventStore is not running, get
Could not create an instance of com.optrak.opkakka.authentication.AuthenticationManagementSpec
akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka://com-optrak-opkakka-authentication-AuthenticationManagementSpec/user/$b/AuthenticationModel#1565142060]] after [2000 ms]
AuthenticationModel is my actor's name.
The questions are,
first, why doesn't my actor respond to ask? The asked command is not persisted and the actor hasn't received any persisted commands to change its state at this point, because it has just been created.
second, how can I detect that the backend is not running beforehand to issue a warning to the user?