Hi, Can't you replace your jobRunnerActor in your test with a TestProbe and do expectMsg with the correct timeout?
Am Donnerstag, 10. September 2015 12:19:40 UTC+2 schrieb √: > > Ah, sorry then I misunderstood. > > If the effect you want executed in scheduleOnce is not observable then you > cannot meaningfully test it. > Where can you observe the effect, and can you put the test in relation to > that? > > On Thu, Sep 10, 2015 at 12:14 PM, Elisabeth Anderson <[email protected] > <javascript:>> wrote: > >> >> >> On Thursday, September 10, 2015 at 10:33:28 AM UTC+1, Akka Team wrote: >>> >>> system.scheduler implements the interface Scheduler. You can stub that >>> interface without mocking an ActorSystem. That will be enough to test that >>> a proper scheduled job was created. >>> >> >> I did try that, and can mock the Scheduler and inject it into my >> implementation fine, it's just how to assert that the scheduleOnce function >> was indeed called. My code (above) doesn't work. >> >> -- >> >>>>>>>>>> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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.
