Never mind. Somehow it started working.

On Friday, September 16, 2016 at 2:13:21 PM UTC-7, Aditya Prasad wrote:
>
> D'oh, thanks! I went back and re-read the docs and now see that there's no 
> (easy) way to be notified on an Actor stop/restart. I'll roll my own 
> technique.
>
> Follow-up question: why might it be that my supervisionStrategy is not 
> being used?
>
> override def supervisorStrategy = {
>   log.error("invoked")  // Never called
>   SupervisorStrategy.stoppingStrategy
> }
>
>
>
> On Thursday, September 15, 2016 at 11:24:01 PM UTC-7, rkuhn wrote:
>>
>> Hi Aditya,
>>
>> Terminated is only sent upon termination, not for a restart: an ActorRef 
>> stays valid across a restart so it would be wrong to signal that it becomes 
>> invalid (which is what Terminated means).
>>
>> Regards,
>>
>> Roland
>>
>> 16 sep. 2016 kl. 08:02 skrev Aditya Prasad <akpr...@gmail.com>:
>>
>> Howdy y'all,
>>
>> I'm using a TestKit probe. It receives most messages just fine. But 
>> somehow it's not noticing the termination of my actor:
>>
>> probe.watch(repActor)
>> probe.expectTerminated(repActor, eventTimeout.plus(100.milliseconds))
>>
>>
>> I get:
>>  
>>
>>> [info]   java.lang.AssertionError: assertion failed: expected: 
>>> Terminated Actor[akka://ReplicatorSpec/user/$a#-968221567] but got 
>>> unexpected message Foo(0)
>>> [info]   at scala.Predef$.assert(Predef.scala:170)
>>> [info]   at akka.testkit.TestKitBase$class.expectMsgPF(TestKit.scala:369)
>>
>> ... 
>>
>> Through logging, I can confirm that (a) the actor did die, and (b) the 
>> Foo(0) message is the first thing the actor sends *after *it restarts 
>> (and that's the only time it is sent).
>>
>> I'm guessing there's something funky about my setup, but I'm not sure 
>> where to start digging. I was thinking using OneInstancePerTest might be 
>> helpful (as seen in another bug report) but that causes its own problems.
>>
>>
>> -- 
>> >>>>>>>>>> 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 akka-user+...@googlegroups.com.
>> To post to this group, send email to akka...@googlegroups.com.
>> Visit this group at https://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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to