Hi Jiunjiun,

what you are seeing has been fixed in 2.3.0: we used to send one
DeathWatchNotification to the parent (for cleanup) and one to every watcher
(for the obvious reason), which would in this case send it twice to the
parent. If the parent terminates quickly enough in response to the first
one, you would see that warning.

Regards,

Roland



On Fri, Mar 14, 2014 at 1:02 AM, Jiunjiun Ma <jiunjiu...@gmail.com> wrote:

> I am also seeing this message in my log (though I am not using the
> TestActorRef). Similar to your test, I have a actor which monitors a child
> and kills itself when the child terminated. Though it doesn't seem to be
> harmful, but it's quite annoying. Wonder what's the cause and how to get
> rid of it.
>
> --Jiunjiun
>
>
> On Thursday, March 6, 2014 2:18:11 PM UTC-8, Jonas K wrote:
>>
>> I'm writing tests for an actor that monitors a child actor. If the child
>> actor dies, the monitor  also stops.
>> Since upgrading to Akka-2.2, I get a warning message when running the
>> test (most of the time...):
>>
>> [default-akka.actor.default-dispatcher-2] [akka://default/user/Monitor]
>> Message [akka.dispatch.sysmsg.DeathWatchNotification] from
>> TestActor[akka://default/user/Monitor] to 
>> TestActor[akka://default/user/Monitor]
>> was not delivered. [1] dead letters encountered.
>>
>> I'm wondering why the actor appears to be sending a
>> DeathWatchNotification to itself, and why it is not delivered, since the
>> test itself checks that the actor dies.
>>
>> The test code:
>>
>> "monitor the quick and the dead" in new ActorSystemContext {
>>   val monitor = TestProbe()
>>   val a = TestActorRef(new MonitoringActor, "Monitor")
>>   monitor.watch(a)
>>   a ! "hi!"
>>   monitor.expectTerminated(a)
>> }
>>
>> The actors (minimal versions of actual code):
>>
>> class DyingActor extends Actor {
>>   def receive = {
>>     case _ => context.stop(self)
>>   }
>> }
>> class MonitoringActor extends Actor {
>>   def receive = {
>>     case Terminated(a) => context.stop(self)
>>     case _ => {
>>       val dyingActor = context.actorOf(Props(new DyingActor))
>>       context.watch(dyingActor)
>>
>>       dyingActor ! "hi"
>>     }
>>   }
>> }
>>
>>
>>
>>
>>  --
> >>>>>>>>>> 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 http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to