Echo client may send requests out of order on errors, okay for this example but will try to find way of maintaining order

This commit is contained in:
Derek Williams 2012-01-14 10:39:55 -07:00
parent 64e0b9eb52
commit c0a3441442

View file

@ -222,9 +222,9 @@ class IOActorSpec extends AkkaSpec with DefaultTimeout {
"run echo server under high load" in {
val client = system.actorOf(Props(new SimpleEchoClient("localhost", 8065)))
val server = system.actorOf(Props(new SimpleEchoServer("localhost", 8065)))
val list = List.range(0, 1000)
val f = Future.traverse(list)(i client ? ByteString(i.toString))
val server = system.actorOf(Props(new SimpleEchoServer("localhost", 8065)))
assert(Await.result(f, TestLatch.DefaultTimeout).size === 1000)
}