I have a test that does something like this:

  "test" in {
      val actorName: String = UUID.randomUUID.toString
      val eventActor = system.actorOf(Props(new EventActor(...)), name =
actorName)

      watch(eventActor) // receive message if actor terminates

      // do something

      system.stop(eventActor)

      // wait for actor to properly terminate
      expectTerminated(eventActor, waitTime)

      // On slow test server:
      // akka.actor.InvalidActorNameException: actor name
[d7bd90a2-4518-4012-9ba4-409b5010c2c5] is not unique!
      val eventActor2 = system.actorOf(Props(new EventActor(...)), name =
actorName)

    }


Intermittently, I get InvalidActorNameException in the last line when I try
to create actor the second time. Isn't expectTerminated supposed to
guarantee that actor name is available again ?


Thanks,
Dragisa

-- 
>>>>>>>>>>      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.

Reply via email to