Play 2.0.2期货在[5000]毫秒后超时

时间:2012-08-02 19:18:03

标签: playframework-2.0 akka

Akka Play 2.0.2正在使用哪个版本?似乎Akka已经删除了此问题中的未来超时。 https://www.assembla.com/spaces/akka/tickets/1433

为什么我仍然会收到超时异常?

2012-08-02T18:51:59+00:00 app[web.1]: play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[TimeoutException: Futures timed out after [5000] milliseconds]]
2012-08-02T18:51:59+00:00 app[web.1]:   at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:134) [play_2.9.1-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:115) [play_2.9.1-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at akka.actor.Actor$class.apply(Actor.scala:318) [akka-actor-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at play.core.ActionInvoker.apply(Invoker.scala:113) [play_2.9.1-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at akka.actor.ActorCell.invoke(ActorCell.scala:626) [akka-actor-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]: Caused by: java.util.concurrent.TimeoutException: Futures timed out after [5000] milliseconds
2012-08-02T18:51:59+00:00 app[web.1]:   at akka.dispatch.DefaultPromise.ready(Future.scala:870) ~[akka-actor-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at akka.dispatch.DefaultPromise.result(Future.scala:874) ~[akka-actor-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at akka.dispatch.Await$.result(Future.scala:74) ~[akka-actor-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at play.api.libs.concurrent.AkkaPromise.await(Akka.scala:43) ~[play_2.9.1-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at play.api.libs.concurrent.Promise$class.await(Promise.scala:55) ~[play_2.9.1-2.0.2.jar:2.0.2]
2012-08-02T18:51:59+00:00 app[web.1]:   at play.api.libs.concurrent.AkkaPromise.await(Akka.scala:28) ~[play_2.9.1-2.0.2.jar:2.0.2]

2 个答案:

答案 0 :(得分:1)

要回答您的第一个问题,从2.0.2标签中,Play使用Akka 2.0.2

您可以查看here

答案 1 :(得分:0)

对于对Play 2.2中的新状态()方法感兴趣的任何人,这是我在测试期间增加超时的方法。

status(resp)(akka.util.Timeout(200000)) must equalTo(OK)