小编Eri*_*ert的帖子

在测试Akka演员时,如何验证发送给自己的消息?

我有一个类似于以下Actor中的Actor.

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 …
Run Code Online (Sandbox Code Playgroud)

testing scala akka

12
推荐指数
1
解决办法
2313
查看次数

标签 统计

akka ×1

scala ×1

testing ×1