You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am currently implementing actors which use a state machine to define an actor's behaviour.
Consider this small transition: Stopped -> Resetting -> Idle -> Stopped. Each time the actor changes it's state, a supervisor gets a notification.
An example of such an actor would be (I did not test this with a python interpreter):
Assume the SubActor is performing a blocking operation e.g. connecting to a server
When my actor is in the stopped state I can call reset on it. The transition to Resetting is testable using the approach from the docs. But if my Resetting state involves sending a message to other actor(s) and transitioning to Idle once they responded, this approach does not seem to work.
Is there a clean way to test this behaviour? I saw a discussion on testing here, but the mailbox checking approach just blocks my test indefinitely.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I am currently implementing actors which use a state machine to define an actor's behaviour.
Consider this small transition: Stopped -> Resetting -> Idle -> Stopped. Each time the actor changes it's state, a supervisor gets a notification.
An example of such an actor would be (I did not test this with a python interpreter):
Assume the SubActor is performing a blocking operation e.g. connecting to a server
When my actor is in the stopped state I can call reset on it. The transition to Resetting is testable using the approach from the docs. But if my Resetting state involves sending a message to other actor(s) and transitioning to Idle once they responded, this approach does not seem to work.
Is there a clean way to test this behaviour? I saw a discussion on testing here, but the mailbox checking approach just blocks my test indefinitely.
Beta Was this translation helpful? Give feedback.
All reactions