次のアクターと機能が似ているアクターがあります。
case class SupervisingActor() extends Actor {
protected val processRouter = //round robin router to remote workers
override def receive = {
case StartProcessing => { //sent from main or someplace else
for (some specified number of process actions ){
processRouter ! WorkInstructions
}
}
case ProcessResults(resultDetails) => { //sent from the remote workers when they complete their work
//do something with the results
if(all of the results have been received){
//*********************
self ! EndProcess //This is the line in question
//*********************
}
}
case EndProcess {
//do some reporting
//shutdown the ActorSystem
}
}
}
}
EndProcess メッセージがテストで自分自身に送信されることを確認するにはどうすればよいですか?
私は scalatest 2.0.M4、Akka 2.0.3、および Scala 1.9.2 を使用しています。