add remote ask “stress” test

This commit is contained in:
Roland 2012-03-28 13:03:54 +02:00
parent 3ef108654c
commit 70a2d3d89c

View file

@ -6,7 +6,7 @@ package akka.remote
import akka.testkit._
import akka.actor._
import com.typesafe.config._
import akka.dispatch.Await
import akka.dispatch.{ Await, Future }
import akka.pattern.ask
object RemoteCommunicationSpec {
@ -130,6 +130,11 @@ akka {
Await.result(system.actorFor(system / "looker" / "child") ? "..", timeout.duration).asInstanceOf[AnyRef] must be theSameInstanceAs l
}
"not fail ask across node boundaries" in {
val f = for (_ 1 to 1000) yield here ? "ping" mapTo manifest[(String, ActorRef)]
Await.result(Future.sequence(f), remaining).map(_._1).toSet must be(Set("pong"))
}
}
}