[英]Play Framework 2.2 - could not find implicit value for parameter timeout
I am testing a call using the following code: 我正在使用以下代码测试呼叫:
"status OK" in {
status(doFakeRequest) === OK
}
The call to status
gives the following compile error: could not find implicit value for parameter timeout: akka.util.Timeout
对
status
的调用给出以下编译错误: could not find implicit value for parameter timeout: akka.util.Timeout
This is because the Helpers
functions have changed. 这是因为
Helpers
功能已经改变。 The timeout can now be changed for each function. 现在可以为每个功能更改超时。
I needed to add the following import: 我需要添加以下导入:
import play.api.test.Helpers.defaultAwaitTimeout
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.