I'm sorry, I didn't imply that you should add a status message, but if the effects of changing the actors state is not observable in its behavior, then why does it matter?
On Wed, Nov 19, 2014 at 5:45 PM, Richard Rodseth <[email protected]> wrote: > I can use underlyingActor, but perhaps that doesn't qualify as "from the > outside". > I might have a GetInfo message I could use (that exists to support a REST > API). > > > On Wed, Nov 19, 2014 at 7:59 AM, √iktor Ҡlang <[email protected]> > wrote: > >> Can you, from the outside, observe whether it updated its internal state? >> >> On Wed, Nov 19, 2014 at 4:53 PM, Richard Rodseth <[email protected]> >> wrote: >> >>> Sorry. The parent actor P gets a message containing measurement data. It >>> calculates a sequence of notifications about that data, which it passes to >>> the per-request child after become()ing "saving". That child updates the >>> persistent state of P, and if that succeeds, posts the notifications to an >>> event bus and sends an ack back to P, at which point P updates its internal >>> in-memory model (advancing a time stamp, basically). >>> >>> There are actually many Ps, but my "micro-integration test" is just to >>> check that P sends the proper notifications to the event bus, and updates >>> its internal state. >>> >>> >>> On Wed, Nov 19, 2014 at 3:48 AM, √iktor Ҡlang <[email protected]> >>> wrote: >>> >>>> I'm not sure I follow. Test for what message and what effect? >>>> >>>> On Wed, Nov 19, 2014 at 1:05 AM, Richard Rodseth <[email protected]> >>>> wrote: >>>> >>>>> This does rather beg the question of what the integration boundary is, >>>>> and also if the use case in question ends with an ack back to the >>>>> initiating actor, how would one test for that message (or its effect), >>>>> given that it's a TestActorRef rather than a TestProbe. >>>>> >>>>> >>>>> >>>>> On Tue, Nov 18, 2014 at 3:08 PM, Richard Rodseth <[email protected]> >>>>> wrote: >>>>> >>>>>> Thanks for the input. I guess I can register a testprobe.ref as a >>>>>> subscriber to the event bus. I will still need to control the creation of >>>>>> the per-request child so that I can inject a mock storage interface that >>>>>> acks with success so that the posting to the event bus occurs. >>>>>> >>>>>> On Tue, Nov 18, 2014 at 2:48 PM, √iktor Ҡlang <[email protected] >>>>>> > wrote: >>>>>> >>>>>>> You can test that the parent passed the correct set of results to >>>>>>> the child actor by observing the results of the child actors processing. >>>>>>> >>>>>>> Usually it becomes tricky to apply Unit Testing to Actors, think >>>>>>> Integration testing instead (but at a microlevel). >>>>>>> >>>>>>> On Tue, Nov 18, 2014 at 11:43 PM, Richard Rodseth < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> The message A in the parent actor is computing a set of results. >>>>>>>> The per-request child will be saving some state from those results, >>>>>>>> and if >>>>>>>> successful, posting a domain event containing the results to an event >>>>>>>> bus >>>>>>>> and also acking back to the parent. >>>>>>>> >>>>>>>> To begin with, I just wish to test that the parent actor passed the >>>>>>>> correct set of results to the child constructor. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Nov 18, 2014 at 2:24 PM, √iktor Ҡlang < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>>>> Hi Richard, >>>>>>>>> >>>>>>>>> what effects are you trying to test? >>>>>>>>> >>>>>>>>> On Tue, Nov 18, 2014 at 11:17 PM, Richard Rodseth < >>>>>>>>> [email protected]> wrote: >>>>>>>>> >>>>>>>>>> I have a parent actor which, on receipt of a certain message A, >>>>>>>>>> spawns a child actor, and sends it a "Run" message with no >>>>>>>>>> parameters. The >>>>>>>>>> child actor has constructor parameters derived from the contents of >>>>>>>>>> message >>>>>>>>>> A. >>>>>>>>>> >>>>>>>>>> What's the best way to test this? I don't think I can apply >>>>>>>>>> techniques like >>>>>>>>>> childMaker: ActorRefFactory => ActorRef >>>>>>>>>> because of the per-request constructor parameters. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> 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 http://groups.google.com/group/akka-user. >>>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Cheers, >>>>>>>>> √ >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>>> 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 http://groups.google.com/group/akka-user. >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>>>> 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 http://groups.google.com/group/akka-user. >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Cheers, >>>>>>> √ >>>>>>> >>>>>>> -- >>>>>>> >>>>>>>>>> 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 http://groups.google.com/group/akka-user. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> >>>>> -- >>>>> >>>>>>>>>> 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 http://groups.google.com/group/akka-user. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>>> >>>> -- >>>> Cheers, >>>> √ >>>> >>>> -- >>>> >>>>>>>>>> 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 http://groups.google.com/group/akka-user. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> >>>>>>>>>> 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 http://groups.google.com/group/akka-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Cheers, >> √ >> >> -- >> >>>>>>>>>> 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 http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > >>>>>>>>>> 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 http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Cheers, √ -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
