Hey there,

This is what my actor looks like  

object Runner {
  def props(race: Race) = Props(classOf[Runner], race)}
class Runner(race: Race) extends Actor with ActorLogging {

  import context.dispatcher

  @throws[Exception](classOf[Exception])
  override def postRestart(reason: Throwable): Unit = context.parent ! 
RestartRunner

  override def receive: Receive = LoggingReceive {
    case Start => {
      log.debug("running...")
      for (i <- 1 to 3) {
        Thread.sleep(200)
      }
      throw new RuntimeException("MarathonRunner is tired")
    }

    case StartWithFuture =>
      log.debug("I am starting to run")
      race.start pipeTo self

    case Failure(throwable) => throw throwable

    case Stop =>
      log.debug("stopping runner")
      context.stop(self)
  }}

and this is what my test looks

import akka.actor.{Props, ActorSystem}import akka.testkit.{TestActorRef, 
TestKit}import org.scalatest._
class RunnerSpec extends TestKit(ActorSystem("test"))with WordSpecLikewith 
MustMatchers {
  "A Runner Actor" must {
    val runner = TestActorRef(Props(new Runner(new Marathon)))
    "receive messages" in {
      runner ! Start
      runner.under <== says Nothing (see attachment)
    }
  }}

So, when I try to get the underlyingActor, I get `Nothing`, what is wrong 
here?

<https://lh3.googleusercontent.com/-BtnZjaaSzYQ/VWvb1nsRyjI/AAAAAAAAAGo/9TiyQGPSjm8/s1600/Screen%2BShot%2B2015-05-31%2Bat%2B9.06.59%2BPM.png>
Thanks a lot

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