1

我正在尝试复制http://www.playframework.org/documentation/2.0.1/JavaFunctionalTest上可用的启动真正的 HTTP 服务器示例,但如果使用此帮助程序执行的游戏测试超过 1 个 @Test

running(testServer(3333)

第二个 @Test 类将失败

这里是java堆栈跟踪:

[error] Test controllers.v1_0.api.UsersTest.createAndRetreiveAndDeleteUser
failed: Promise timed out after 5000 : MILLISECONDS
[error]     at play.api.libs.concurrent.STMPromise$$anonfun$await$1.apply(Promise.scala:158)
[error]     at play.api.libs.concurrent.STMPromise$$anonfun$await$1.apply(Promise.scala:154)
[error]     at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:538)
[error]     at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:494)
[error]     at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:365)
[error]     at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:244)
[error]     at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
[error]     at play.api.libs.concurrent.STMPromise.await(Promise.scala:154)
[error]     at play.api.libs.concurrent.Promise$class.await(Promise.scala:44)
[error]     at play.api.libs.concurrent.STMPromise.await(Promise.scala:113)
[error]     at play.api.libs.concurrent.Promise$class.value(Promise.scala:42)
[error]     at play.api.libs.concurrent.STMPromise.value(Promise.scala:113)
[error]     at play.libs.F$Promise.get(F.java:90)
[error]     at controllers.v1_0.api.UsersTest.createUserTest(UsersTest.java:50)
[error]     at controllers.v1_0.api.UsersTest.access$000(UsersTest.java:18)
[error]     at controllers.v1_0.api.UsersTest$1.run(UsersTest.java:25)
[error]     at play.test.Helpers.running(Helpers.java:317)
[error]     at controllers.v1_0.api.UsersTest.createAndRetreiveAndDeleteUser(UsersTest.java:22)

增加超时没有帮助。

感谢您的帮助,安德里亚

4

0 回答 0