Hi All,
We are trying to test *Spawned* *Effect* in a Akka Typed actor using
*BehaviorTestKit*
Consider a Behavior representing a child actor as below
object ChildBehaviorFactory {
def make[T](someFactory: SomeFactory): Behavior[ChildMessage] =
Behaviors.mutable[ChildMessage](ctx ⇒ new ChildBehavior(ctx, someFactory
))
}
Consider a Parent Actor which spawns the above actor as below
class ParentBehavior extends Behaviors.MutableBehavior[MyParent] {
...
ctx.spawn(ChildBehaviorFactory.make(someFactory), "ChildActor")
...
}
If we try to assert on the Spawned effect obtained for Parent behavior
against
Spawned(ChildBehaviorFactory.make(someFactory), "ChildActor")
The test fails because the behavior created in the test is different than
the one created inside the parent.
Notably, this is different than the Spawned effect present in the earlier
Akka version where it only expected the name of actor spawned which worked
fine.
We looked at the tests present in the Akka code base as well where the
behaviors were created as a *val *and was accessible in the test as well
as the behavior under test. But this looks very restrictive.
Is there any way to work around this?
Thanks and Regards,
Nishant
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.